File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
compiler/rustc_borrowck/src/region_infer
tests/ui/type-alias-impl-trait Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -278,8 +278,15 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
278278 // HACK This bubble is required for this tests to pass:
279279 // nested-return-type2-tait2.rs
280280 // nested-return-type2-tait3.rs
281- let infcx =
282- self . tcx . infer_ctxt ( ) . with_opaque_type_inference ( DefiningAnchor :: Bubble ) . build ( ) ;
281+ let infcx = self
282+ . tcx
283+ . infer_ctxt ( )
284+ . with_opaque_type_inference ( if self . tcx . trait_solver_next ( ) {
285+ DefiningAnchor :: Bind ( def_id)
286+ } else {
287+ DefiningAnchor :: Bubble
288+ } )
289+ . build ( ) ;
283290 let ocx = ObligationCtxt :: new ( & infcx) ;
284291 // Require the hidden type to be well-formed with only the generics of the opaque type.
285292 // Defining use functions may have more bounds than the opaque type, which is ok, as long as the
Original file line number Diff line number Diff line change 1+ // revisions: current next
2+ //[next] compile-flags: -Ztrait-solver=next
13// check-pass
24
35#![ feature( type_alias_impl_trait) ]
You can’t perform that action at this time.
0 commit comments