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> {
1125
1125
// Note: if these two lines are combined into one we get
1126
1126
// dynamic borrow errors on `self.inner`.
1127
1127
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
+ } )
1129
1131
}
1130
1132
1131
1133
ty:: IntVar ( v) => {
Original file line number Diff line number Diff line change 3
3
// behavior has been fixed.
4
4
5
5
//@ check-pass
6
+ //@ revisions: current next
7
+ //@ ignore-compare-mode-next-solver (explicit revisions)
8
+ //@[next] compile-flags: -Znext-solver
6
9
7
10
fn peculiar ( ) -> impl Fn ( u8 ) -> u8 {
8
11
return |x| x + 1
You can’t perform that action at this time.
0 commit comments