File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
compiler/rustc_infer/src/infer Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1125,7 +1125,9 @@ impl<'tcx> InferCtxt<'tcx> {
11251125 // Note: if these two lines are combined into one we get
11261126 // dynamic borrow errors on `self.inner`.
11271127 let known = self . inner . borrow_mut ( ) . type_variables ( ) . probe ( v) . known ( ) ;
1128- known. map_or ( ty, |t| self . shallow_resolve ( t) )
1128+ known. map_or ( Ty :: new_var ( self . tcx , self . root_var ( v) ) , |t| {
1129+ self . shallow_resolve ( t)
1130+ } )
11291131 }
11301132
11311133 ty:: IntVar ( v) => {
Original file line number Diff line number Diff line change 33// behavior has been fixed.
44
55//@ check-pass
6+ //@ revisions: current next
7+ //@ ignore-compare-mode-next-solver (explicit revisions)
8+ //@[next] compile-flags: -Znext-solver
69
710fn peculiar ( ) -> impl Fn ( u8 ) -> u8 {
811 return |x| x + 1
You can’t perform that action at this time.
0 commit comments