Skip to content

Commit e929d19

Browse files
committed
review comments
1 parent 2f7b320 commit e929d19

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libcore/convert.rs

+1-1
Original file line numberDiff line numberDiff 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
)]
361361
pub trait From<T>: Sized {

src/test/ui/suggestions/into-str.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0277]: the trait bound `&str: std::convert::From<std::string::String>` is
44
LL | 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`
99
note: required by `foo`
1010
--> $DIR/into-str.rs:1:1

0 commit comments

Comments
 (0)