File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
rustc_error_messages/locales/en-US Expand file tree Collapse file tree 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(
398398 tcx. sess . emit_err ( OpaqueTypeNotDefine {
399399 cause : OpaqueTyDefineErrCause :: NonGenericUsed {
400400 span : tcx. def_span ( opaque_param. def_id ) ,
401- descr : opaque_param. kind . descr ( ) . to_string ( ) ,
401+ descr : & opaque_param. kind . descr ( ) ,
402402 arg : arg. to_string ( ) ,
403403 } ,
404404 span,
Original file line number Diff line number Diff line change @@ -462,7 +462,7 @@ pub(crate) enum OpaqueTyDefineErrCause {
462462 NonGenericUsed {
463463 #[ primary_span]
464464 span : Span ,
465- descr : String ,
465+ descr : & ' static str ,
466466 arg : String ,
467467 } ,
468468 #[ 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 =
262262 lifetime `{ $r } ` is part of concrete type but not used in parameter list of the `impl Trait` type alias
263263
264264borrowck_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
266270
267271borrowck_cannot_use_static_lifetime_here =
268272 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