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> {
17961796
17971797 // If we are passing through a constraint added because `'lt: 'unnameable`,
17981798 // 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| {
18001800 if let ConstraintCategory :: OutlivesUnnameablePlaceholder ( lt, unnameable) = c. category {
18011801 Some ( ( lt, unnameable) )
18021802 } else {
18031803 None
18041804 }
1805- } ) {
1805+ } ) ;
1806+ let path = if let Some ( ( lt, unnameable) ) = due_to_placeholder_outlives {
18061807 // This the `false` argument is what prevents circular reasoning here!
18071808 self . constraint_path_to ( lt, |r| r == unnameable, false ) . unwrap ( ) . 0
18081809 } else {
You can’t perform that action at this time.
0 commit comments