simplify applying closure requirements
Don't use `ConstraintCategory::ClosureBounds`! Set the category and the span for the promoted constraints to that of the original constraint earlier than before. This eliminates the need for `closure_bounds_mapping`.
This commit is contained in:
parent
81ff7e7385
commit
df668b9fb9
9 changed files with 97 additions and 237 deletions
|
@ -163,6 +163,7 @@ impl<'s, 'tcx, D: ConstraintGraphDirecton> Iterator for Edges<'s, 'tcx, D> {
|
|||
span: DUMMY_SP,
|
||||
category: ConstraintCategory::Internal,
|
||||
variance_info: VarianceDiagInfo::default(),
|
||||
from_closure: false,
|
||||
})
|
||||
} else {
|
||||
None
|
||||
|
|
|
@ -96,6 +96,9 @@ pub struct OutlivesConstraint<'tcx> {
|
|||
|
||||
/// Variance diagnostic information
|
||||
pub variance_info: VarianceDiagInfo<'tcx>,
|
||||
|
||||
/// If this constraint is promoted from closure requirements.
|
||||
pub from_closure: bool,
|
||||
}
|
||||
|
||||
impl<'tcx> fmt::Debug for OutlivesConstraint<'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue