Skip to content

Commit 5d00483

Browse files
committed
NonGenericOpaqueTypeParam::ty to arg
1 parent 8303383 commit 5d00483

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: compiler/rustc_trait_selection/messages.ftl

+2-2
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ trait_selection_oc_type_compat = type not compatible with trait
268268
trait_selection_opaque_captures_lifetime = hidden type for `{$opaque_ty}` captures lifetime that does not appear in bounds
269269
.label = opaque type defined here
270270
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") ->
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
}

Diff for: compiler/rustc_trait_selection/src/errors.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1926,7 +1926,7 @@ impl Subdiagnostic for AddPreciseCapturingForOvercapture {
19261926
#[derive(Diagnostic)]
19271927
#[diag(trait_selection_opaque_type_non_generic_param, code = E0792)]
19281928
pub(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,

Diff for: compiler/rustc_trait_selection/src/opaque_types.rs

+1-1
Original file line numberDiff line numberDiff 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),

0 commit comments

Comments
 (0)