Enum rusttyc::TcErr [−][src]
Represents an error during the type check procedure.
Variants
Two keys were attempted to be equated and their underlying types turned out to be incompatible. Contains the two keys and the error that occurred when attempting to meet their ContextSensitiveVariant types.
An explicit type bound imposed on a key turned out to be incompatible with the type inferred based on remaining information on the key. Contains the key and the error that occurred when meeting the explicit bound with the inferred type variant.
This error occurs when a constraint accesses the n
th child of a type and its variant turns out to only
have k < n
sub-types.
Contains the affected key, its inferred or explicitly assigned variant, and the index of the child that
was attempted to be accessed.
This error occurs if the type checker inferred a specific arity but the variant reports a fixed arity that is lower than the inferred one.
Fields of ArityMismatch
Construction(TcKey, Preliminary<V>, V::Err)
An error reporting a failed type construction. Contains the affected key, the preliminary result for which the construction failed, and the error reported by the construction.
ChildConstruction(TcKey, usize, Preliminary<V>, V::Err)
This error indicates that a variant requires children, for one of which the construction failed. Note that this can occur seemingly-spuriously, e.g., if a child needs to be present but there were no restrictions on said child. In this case, the construction attempts and might fail to construct a child out of a ContextSensitiveVariant::top(). The error contains the affected key, the index of the child, the preliminary result of which a child construction failed, and the error reported by the construction of the child.
This error reports cyclic non-equality dependencies in the constraint graph. Example: Key 1 is more concrete than Key 2, which is more concrete than Key 3, which is more concrete than Key 1.
Trait Implementations
impl<V: Clone + ContextSensitiveVariant> Clone for TcErr<V> where
V::Err: Clone,
V::Err: Clone,
V::Err: Clone,
V::Err: Clone,
[src]
V::Err: Clone,
V::Err: Clone,
V::Err: Clone,
V::Err: Clone,
impl<V: Debug + ContextSensitiveVariant> Debug for TcErr<V> where
V::Err: Debug,
V::Err: Debug,
V::Err: Debug,
V::Err: Debug,
[src]
V::Err: Debug,
V::Err: Debug,
V::Err: Debug,
V::Err: Debug,
Auto Trait Implementations
impl<V> RefUnwindSafe for TcErr<V> where
V: RefUnwindSafe,
<V as ContextSensitiveVariant>::Err: RefUnwindSafe,
[src]
V: RefUnwindSafe,
<V as ContextSensitiveVariant>::Err: RefUnwindSafe,
impl<V> Send for TcErr<V> where
V: Send,
<V as ContextSensitiveVariant>::Err: Send,
[src]
V: Send,
<V as ContextSensitiveVariant>::Err: Send,
impl<V> Sync for TcErr<V> where
V: Sync,
<V as ContextSensitiveVariant>::Err: Sync,
[src]
V: Sync,
<V as ContextSensitiveVariant>::Err: Sync,
impl<V> Unpin for TcErr<V> where
V: Unpin,
<V as ContextSensitiveVariant>::Err: Unpin,
[src]
V: Unpin,
<V as ContextSensitiveVariant>::Err: Unpin,
impl<V> UnwindSafe for TcErr<V> where
V: UnwindSafe,
<V as ContextSensitiveVariant>::Err: UnwindSafe,
[src]
V: UnwindSafe,
<V as ContextSensitiveVariant>::Err: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,