Skip to content

Commit 8695bb5

Browse files
amandasystemslcnr
andauthored
Update compiler/rustc_borrowck/src/region_infer/mod.rs
Co-authored-by: lcnr <[email protected]>
1 parent 0328df9 commit 8695bb5

File tree

1 file changed

+3
-2
lines changed
  • compiler/rustc_borrowck/src/region_infer

1 file changed

+3
-2
lines changed

compiler/rustc_borrowck/src/region_infer/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)