File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 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 {
355355#[ rustc_on_unimplemented(
356356 on(
357357 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" ,
359359 )
360360) ]
361361pub 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
44LL | foo(String::new());
55 | ^^^ the trait `std::convert::From<std::string::String>` is not implemented for `&str`
66 |
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
88 = note: required because of the requirements on the impl of `std::convert::Into<&str>` for `std::string::String`
99note: required by `foo`
1010 --> $DIR/into-str.rs:1:1
You can’t perform that action at this time.
0 commit comments