make outlives constraints from generic arguments less boring
This commit is contained in:
parent
6421d4cf80
commit
10061b3a4f
5 changed files with 35 additions and 19 deletions
|
@ -229,7 +229,7 @@ pub enum ConstraintCategory<'tcx> {
|
|||
Yield,
|
||||
UseAsConst,
|
||||
UseAsStatic,
|
||||
TypeAnnotation,
|
||||
TypeAnnotation(AnnotationSource),
|
||||
Cast {
|
||||
/// Whether this cast is a coercion that was automatically inserted by the compiler.
|
||||
is_implicit_coercion: bool,
|
||||
|
@ -280,6 +280,15 @@ pub enum ReturnConstraint {
|
|||
ClosureUpvar(FieldIdx),
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
|
||||
#[derive(TyEncodable, TyDecodable, HashStable, TypeVisitable, TypeFoldable)]
|
||||
pub enum AnnotationSource {
|
||||
Ascription,
|
||||
Declaration,
|
||||
OpaqueCast,
|
||||
GenericArg,
|
||||
}
|
||||
|
||||
/// The subject of a `ClosureOutlivesRequirement` -- that is, the thing
|
||||
/// that must outlive some region.
|
||||
#[derive(Copy, Clone, Debug, TyEncodable, TyDecodable, HashStable)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue