diff --git a/src/libcore/convert.rs b/src/libcore/convert.rs index cb574a53dbc..d36de3bbe86 100644 --- a/src/libcore/convert.rs +++ b/src/libcore/convert.rs @@ -355,7 +355,7 @@ pub trait Into: Sized { #[rustc_on_unimplemented( on( all(_Self="&str", T="std::string::String"), - note="you can coerce a `{T}` into a `{Self}` by writing `&*variable`" + note="to coerce a `{T}` into a `{Self}`, use `&*` as a prefix", ) )] pub trait From: Sized { diff --git a/src/test/ui/suggestions/into-str.stderr b/src/test/ui/suggestions/into-str.stderr index f341d363702..3e28700ce95 100644 --- a/src/test/ui/suggestions/into-str.stderr +++ b/src/test/ui/suggestions/into-str.stderr @@ -4,7 +4,7 @@ error[E0277]: the trait bound `&str: std::convert::From` is LL | foo(String::new()); | ^^^ the trait `std::convert::From` is not implemented for `&str` | - = note: you can coerce a `std::string::String` into a `&str` by writing `&*variable` + = note: to coerce a `std::string::String` into a `&str`, use `&*` as a prefix = note: required because of the requirements on the impl of `std::convert::Into<&str>` for `std::string::String` note: required by `foo` --> $DIR/into-str.rs:1:1