File tree 3 files changed +7
-3
lines changed
rustc_error_messages/locales/en-US
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ fn check_opaque_type_parameter_valid(
398
398
tcx. sess . emit_err ( OpaqueTypeNotDefine {
399
399
cause : OpaqueTyDefineErrCause :: NonGenericUsed {
400
400
span : tcx. def_span ( opaque_param. def_id ) ,
401
- descr : opaque_param. kind . descr ( ) . to_string ( ) ,
401
+ descr : & opaque_param. kind . descr ( ) ,
402
402
arg : arg. to_string ( ) ,
403
403
} ,
404
404
span,
Original file line number Diff line number Diff line change @@ -462,7 +462,7 @@ pub(crate) enum OpaqueTyDefineErrCause {
462
462
NonGenericUsed {
463
463
#[ primary_span]
464
464
span : Span ,
465
- descr : String ,
465
+ descr : & ' static str ,
466
466
arg : String ,
467
467
} ,
468
468
#[ label( borrowck:: cannot_use_static_lifetime_here) ]
Original file line number Diff line number Diff line change @@ -262,7 +262,11 @@ borrowck_lifetime_not_used_in_trait_type_alias =
262
262
lifetime `{ $r } ` is part of concrete type but not used in parameter list of the `impl Trait` type alias
263
263
264
264
borrowck_used_non_generic_for_generic =
265
- used non-generic { $descr } `{ $arg } ` for generic parameter
265
+ used non-generic { $descr ->
266
+ [ lifetime ] lifetime
267
+ [ type ] type
268
+ *[ constant ] constant
269
+ } `{ $arg } ` for generic parameter
266
270
267
271
borrowck_cannot_use_static_lifetime_here =
268
272
cannot use static lifetime; use a bound lifetime instead or remove the lifetime parameter from the opaque type
You can’t perform that action at this time.
0 commit comments