@@ -145,7 +145,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
145
145
self . commit_if_ok ( |_| {
146
146
let at = self
147
147
. at ( & self . cause , self . fcx . param_env )
148
- . define_opaque_types ( self . defining_use_anchor ) ;
148
+ . define_opaque_types ( self . defining_use_anchor ( ) ) ;
149
149
if self . use_lub {
150
150
at. lub ( b, a)
151
151
} else {
@@ -178,7 +178,7 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
178
178
// due to `[type error]` and `_` not coercing together.
179
179
let _ = self . commit_if_ok ( |_| {
180
180
self . at ( & self . cause , self . param_env )
181
- . define_opaque_types ( self . defining_use_anchor )
181
+ . define_opaque_types ( self . defining_use_anchor ( ) )
182
182
. eq ( a, b)
183
183
} ) ;
184
184
return success ( vec ! [ ] , self . fcx . tcx . ty_error ( guar) , vec ! [ ] ) ;
@@ -585,8 +585,8 @@ impl<'f, 'tcx> Coerce<'f, 'tcx> {
585
585
}
586
586
} ) ?;
587
587
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 ( ) ) ;
590
590
591
591
// Create an obligation for `Source: CoerceUnsized<Target>`.
592
592
let cause = ObligationCause :: new (
@@ -1492,7 +1492,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
1492
1492
assert ! ( expression_ty. is_unit( ) , "if let hack without unit type" ) ;
1493
1493
fcx. at ( cause, fcx. param_env )
1494
1494
// 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 ( ) )
1496
1496
. eq_exp ( label_expression_as_expected, expression_ty, self . merged_ty ( ) )
1497
1497
. map ( |infer_ok| {
1498
1498
fcx. register_infer_ok_obligations ( infer_ok) ;
0 commit comments