]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/into-str.stderr
Rollup merge of #90420 - GuillaumeGomez:rustdoc-internals-feature, r=camelid
[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:9
3    |
4 LL |     foo(String::new());
5    |     --- ^^^^^^^^^^^^^ the trait `From<String>` is not implemented for `&str`
6    |     |
7    |     required by a bound introduced by this call
8    |
9    = note: to coerce a `String` into a `&str`, use `&*` as a prefix
10    = note: required because of the requirements on the impl of `Into<&str>` for `String`
11 note: required by a bound in `foo`
12   --> $DIR/into-str.rs:1:31
13    |
14 LL | fn foo<'a, T>(_t: T) where T: Into<&'a str> {}
15    |                               ^^^^^^^^^^^^^ required by this bound in `foo`
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0277`.