@@ -145,7 +145,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
145145 self . commit_if_ok ( |_| {
146146 let at = self
147147 . at ( & self . cause , self . fcx . param_env )
148- . define_opaque_types ( self . defining_use_anchor ) ;
148+ . define_opaque_types ( self . defining_use_anchor ( ) ) ;
149149 if self . use_lub {
150150 at. lub ( b, a)
151151 } else {
@@ -178,7 +178,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
178178 // due to `[type error]` and `_` not coercing together.
179179 let _ = self . commit_if_ok ( |_| {
180180 self . at ( & self . cause , self . param_env )
181- . define_opaque_types ( self . defining_use_anchor )
181+ . define_opaque_types ( self . defining_use_anchor ( ) )
182182 . eq ( a, b)
183183 } ) ;
184184 return success ( vec ! [ ] , self . fcx . tcx . ty_error ( guar) , vec ! [ ] ) ;
@@ -585,8 +585,8 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
585585 }
586586 } ) ?;
587587
588- let mut selcx =
589- traits :: SelectionContext :: new ( self ) . with_defining_use_anchor ( self . defining_use_anchor ) ;
588+ let mut selcx = traits :: SelectionContext :: new ( self )
589+ . with_defining_use_anchor ( self . defining_use_anchor ( ) ) ;
590590
591591 // Create an obligation for `Source: CoerceUnsized<Target>`.
592592 let cause = ObligationCause :: new (
@@ -1492,7 +1492,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
14921492 assert ! ( expression_ty. is_unit( ) , "if let hack without unit type" ) ;
14931493 fcx. at ( cause, fcx. param_env )
14941494 // needed for tests/ui/type-alias-impl-trait/issue-65679-inst-opaque-ty-from-val-twice.rs
1495- . define_opaque_types ( fcx. defining_use_anchor )
1495+ . define_opaque_types ( fcx. defining_use_anchor ( ) )
14961496 . eq_exp ( label_expression_as_expected, expression_ty, self . merged_ty ( ) )
14971497 . map ( |infer_ok| {
14981498 fcx. register_infer_ok_obligations ( infer_ok) ;
0 commit comments