File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -355,7 +355,7 @@ pub trait Into<T>: Sized {
355
355
#[ rustc_on_unimplemented(
356
356
on(
357
357
all( _Self="&str" , T ="std::string::String" ) ,
358
- note="you can coerce a `{T}` into a `{Self}` by writing `&*variable`"
358
+ note="to coerce a `{T}` into a `{Self}`, use `&*` as a prefix" ,
359
359
)
360
360
) ]
361
361
pub trait From < T > : Sized {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ error[E0277]: the trait bound `&str: std::convert::From<std::string::String>` is
4
4
LL | foo(String::new());
5
5
| ^^^ the trait `std::convert::From<std::string::String>` is not implemented for `&str`
6
6
|
7
- = note: you can coerce a `std::string::String` into a `&str` by writing `&*variable`
7
+ = note: to coerce a `std::string::String` into a `&str`, use `&*` as a prefix
8
8
= note: required because of the requirements on the impl of `std::convert::Into<&str>` for `std::string::String`
9
9
note: required by `foo`
10
10
--> $DIR/into-str.rs:1:1
You can’t perform that action at this time.
0 commit comments