File tree 3 files changed +4
-4
lines changed
compiler/rustc_trait_selection
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -268,8 +268,8 @@ trait_selection_oc_type_compat = type not compatible with trait
268
268
trait_selection_opaque_captures_lifetime = hidden type for `{ $opaque_ty } ` captures lifetime that does not appear in bounds
269
269
.label = opaque type defined here
270
270
trait_selection_opaque_type_non_generic_param =
271
- expected generic { $kind } parameter, found `{ $ty } `
272
- .label = { STREQ( $ty , "'static") ->
271
+ expected generic { $kind } parameter, found `{ $arg } `
272
+ .label = { STREQ( $arg , "'static") ->
273
273
[ true ] cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
274
274
*[ other ] this generic parameter must be used with a generic { $kind } parameter
275
275
}
Original file line number Diff line number Diff line change @@ -1926,7 +1926,7 @@ impl Subdiagnostic for AddPreciseCapturingForOvercapture {
1926
1926
#[ derive( Diagnostic ) ]
1927
1927
#[ diag( trait_selection_opaque_type_non_generic_param, code = E0792 ) ]
1928
1928
pub ( crate ) struct NonGenericOpaqueTypeParam < ' a , ' tcx > {
1929
- pub ty : GenericArg < ' tcx > ,
1929
+ pub arg : GenericArg < ' tcx > ,
1930
1930
pub kind : & ' a str ,
1931
1931
#[ primary_span]
1932
1932
pub span : Span ,
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ pub fn check_opaque_type_parameter_valid<'tcx>(
70
70
opaque_env. param_is_error ( i) ?;
71
71
72
72
return Err ( infcx. dcx ( ) . emit_err ( NonGenericOpaqueTypeParam {
73
- ty : arg,
73
+ arg,
74
74
kind,
75
75
span,
76
76
param_span : tcx. def_span ( opaque_param. def_id ) ,
You can’t perform that action at this time.
0 commit comments