File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
compiler/rustc_trait_selection Expand file tree Collapse file tree 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
268268trait_selection_opaque_captures_lifetime = hidden type for `{ $opaque_ty } ` captures lifetime that does not appear in bounds
269269 .label = opaque type defined here
270270trait_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") ->
273273 [ true ] cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
274274 *[ other ] this generic parameter must be used with a generic { $kind } parameter
275275 }
Original file line number Diff line number Diff line change @@ -1926,7 +1926,7 @@ impl Subdiagnostic for AddPreciseCapturingForOvercapture {
19261926#[ derive( Diagnostic ) ]
19271927#[ diag( trait_selection_opaque_type_non_generic_param, code = E0792 ) ]
19281928pub ( crate ) struct NonGenericOpaqueTypeParam < ' a , ' tcx > {
1929- pub ty : GenericArg < ' tcx > ,
1929+ pub arg : GenericArg < ' tcx > ,
19301930 pub kind : & ' a str ,
19311931 #[ primary_span]
19321932 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>(
7070 opaque_env. param_is_error ( i) ?;
7171
7272 return Err ( infcx. dcx ( ) . emit_err ( NonGenericOpaqueTypeParam {
73- ty : arg,
73+ arg,
7474 kind,
7575 span,
7676 param_span : tcx. def_span ( opaque_param. def_id ) ,
You can’t perform that action at this time.
0 commit comments