#[non_exhaustive]pub enum ResolveError {
BudgetExceeded {
limit: Limit,
},
DuplicateUnit {
unit: UnitId,
},
}Expand description
Why a resolution run stopped without a result.
Name errors in the program are not ResolveErrors: they are
Diagnostics in a successful result. A run fails only
when the input is unusable as a whole or exceeds a Budget.
§Examples
use hir_lang::UnitId;
use resolve_lang::ResolveError;
let e = ResolveError::DuplicateUnit { unit: UnitId::new(3) };
assert_eq!(e.to_string(), "two units of the program have the id 3");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.
BudgetExceeded
The program reached a budget limit. Raise the limit with
Budget if the input is trusted, or reject the input.
DuplicateUnit
Two units share a UnitId; DefIds could not tell them apart.
Give every unit of a program a distinct id.
Trait Implementations§
Source§impl Clone for ResolveError
impl Clone for ResolveError
impl Copy for ResolveError
Source§impl Debug for ResolveError
impl Debug for ResolveError
Source§impl Display for ResolveError
impl Display for ResolveError
impl Eq for ResolveError
Source§impl Error for ResolveError
impl Error for ResolveError
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 Hash for ResolveError
impl Hash for ResolveError
Source§impl PartialEq for ResolveError
impl PartialEq for ResolveError
impl StructuralPartialEq for ResolveError
Auto Trait Implementations§
impl Freeze for ResolveError
impl RefUnwindSafe for ResolveError
impl Send for ResolveError
impl Sync for ResolveError
impl Unpin for ResolveError
impl UnsafeUnpin for ResolveError
impl UnwindSafe for ResolveError
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