]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/into-str.stderr
Auto merge of #87284 - Aaron1011:remove-paren-special, r=petrochenkov
[rust.git] / src / test / ui / suggestions / into-str.stderr
1 error[E0277]: the trait bound `&str: From<String>` is not satisfied
2   --> $DIR/into-str.rs:4:5
3    |
4 LL | fn foo<'a, T>(_t: T) where T: Into<&'a str> {}
5    |                               ------------- required by this bound in `foo`
6 ...
7 LL |     foo(String::new());
8    |     ^^^ the trait `From<String>` is not implemented for `&str`
9    |
10    = note: to coerce a `String` into a `&str`, use `&*` as a prefix
11    = note: required because of the requirements on the impl of `Into<&str>` for `String`
12
13 error: aborting due to previous error
14
15 For more information about this error, try `rustc --explain E0277`.