Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Mar 23, 2019
1 parent 2f7b320 commit e929d19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libcore/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ pub trait Into<T>: 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<T>: Sized {
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/suggestions/into-str.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0277]: the trait bound `&str: std::convert::From<std::string::String>` is
LL | foo(String::new());
| ^^^ the trait `std::convert::From<std::string::String>` 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
Expand Down

0 comments on commit e929d19

Please sign in to comment.