pub enum LitToConstError {
TypeError,
Reported(ErrorGuaranteed),
}Expand description
Error type for tcx.lit_to_const.
Variants§
TypeError
The literal’s inferred type did not match the expected ty in the input.
This is used for graceful error handling (span_delayed_bug) in
type checking (Const::from_anon_const).
Reported(ErrorGuaranteed)
Auto Trait Implementations§
impl Freeze for LitToConstError
impl RefUnwindSafe for LitToConstError
impl Send for LitToConstError
impl Sync for LitToConstError
impl Unpin for LitToConstError
impl UnwindSafe for LitToConstError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.