#[derive(Copy, Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable)]
pub enum ConstraintCategory {
Return,
+ Yield,
UseAsConst,
UseAsStatic,
TypeAnnotation,
match self {
ConstraintCategory::Assignment => "assignment ",
ConstraintCategory::Return => "returning this value ",
+ ConstraintCategory::Yield => "yielding this value ",
ConstraintCategory::UseAsConst => "using this value as a constant ",
ConstraintCategory::UseAsStatic => "using this value as a static ",
ConstraintCategory::Cast => "cast ",
let constraint_sup_scc = self.constraint_sccs.scc(constraint.sup);
match categorized_path[i].0 {
- ConstraintCategory::OpaqueType
- | ConstraintCategory::Boring
- | ConstraintCategory::BoringNoLocation
- | ConstraintCategory::Internal => false,
- ConstraintCategory::TypeAnnotation | ConstraintCategory::Return => true,
+ ConstraintCategory::OpaqueType | ConstraintCategory::Boring |
+ ConstraintCategory::BoringNoLocation | ConstraintCategory::Internal => false,
+ ConstraintCategory::TypeAnnotation | ConstraintCategory::Return |
+ ConstraintCategory::Yield => true,
_ => constraint_sup_scc != target_scc,
}
});