Enum rustc_middle::mir::terminator::ConstraintCategory [−][src]
pub enum ConstraintCategory {
Show variants
Return(ReturnConstraint),
Yield,
UseAsConst,
UseAsStatic,
TypeAnnotation,
Cast,
ClosureBounds,
CallArgument,
CopyBound,
SizedBound,
Assignment,
OpaqueType,
ClosureUpvar(HirId),
Boring,
BoringNoLocation,
Internal,
}Expand description
Outlives-constraints can be categorized to determine whether and why they are interesting (for error reporting). Order of variants indicates sort order of the category, thereby influencing diagnostic output.
See also rustc_mir::borrow_check::constraints.
Variants
Return(ReturnConstraint)A constraint that came from checking the body of a closure.
We try to get the category that the closure used when reporting this.
ClosureUpvar(HirId)A “boring” constraint (caused by the given location) is one that
the user probably doesn’t want to see described in diagnostics,
because it is kind of an artifact of the type system setup.
Example: x = Foo { field: y } technically creates
intermediate regions representing the “type of Foo { field: y }”, and data flows from y into those variables, but they
are not very interesting. The assignment into x on the other
hand might be.
A constraint that doesn’t correspond to anything the user sees.
Trait Implementations
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for ConstraintCategoryimpl Send for ConstraintCategoryimpl Sync for ConstraintCategoryimpl Unpin for ConstraintCategoryimpl UnwindSafe for ConstraintCategoryBlanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 12 bytes