File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
compiler/rustc_borrowck/src/region_infer Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1796,13 +1796,14 @@ impl<'tcx> RegionInferenceContext<'tcx> {
1796
1796
1797
1797
// If we are passing through a constraint added because `'lt: 'unnameable`,
1798
1798
// where cannot name `'unnameable`, redirect search towards `'unnameable`.
1799
- let path = if let Some ( ( lt , unnameable ) ) = path. iter ( ) . find_map ( |c| {
1799
+ let due_to_placeholder_outlives = path. iter ( ) . find_map ( |c| {
1800
1800
if let ConstraintCategory :: OutlivesUnnameablePlaceholder ( lt, unnameable) = c. category {
1801
1801
Some ( ( lt, unnameable) )
1802
1802
} else {
1803
1803
None
1804
1804
}
1805
- } ) {
1805
+ } ) ;
1806
+ let path = if let Some ( ( lt, unnameable) ) = due_to_placeholder_outlives {
1806
1807
// This the `false` argument is what prevents circular reasoning here!
1807
1808
self . constraint_path_to ( lt, |r| r == unnameable, false ) . unwrap ( ) . 0
1808
1809
} else {
You can’t perform that action at this time.
0 commit comments