#[non_exhaustive]pub enum LowerError {
NodeBudget {
limit: u64,
},
SymbolSpaceExhausted,
Hir(HirError),
}Expand description
Why lowering stopped without a result. Problems in the code never stop it; only exhausted resources do.
§Examples
use lower_lang::LowerError;
let e = LowerError::NodeBudget { limit: 10 };
assert_eq!(e.to_string(), "lowering would build more than 10 HIR nodes");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NodeBudget
Lowering would build more HIR nodes than
Budget::max_nodes. Raise the budget if the input is
trusted and genuinely that large; otherwise reject it.
SymbolSpaceExhausted
The interner ran out of symbols. Use a fresh interner per session.
Hir(HirError)
hir-lang refused the result without a repair (capacity exceeded). Split the input.
Trait Implementations§
Source§impl Clone for LowerError
impl Clone for LowerError
impl Copy for LowerError
Source§impl Debug for LowerError
impl Debug for LowerError
Source§impl Display for LowerError
impl Display for LowerError
impl Eq for LowerError
Source§impl Error for LowerError
impl Error for LowerError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for LowerError
impl PartialEq for LowerError
impl StructuralPartialEq for LowerError
Auto Trait Implementations§
impl Freeze for LowerError
impl RefUnwindSafe for LowerError
impl Send for LowerError
impl Sync for LowerError
impl Unpin for LowerError
impl UnsafeUnpin for LowerError
impl UnwindSafe for LowerError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more