]> git.proxmox.com Git - rustc.git/blame - tests/ui/suggestions/into-str.stderr
New upstream version 1.72.1+dfsg1
[rustc.git] / tests / ui / suggestions / into-str.stderr
CommitLineData
1b1a35ee 1error[E0277]: the trait bound `&str: From<String>` is not satisfied
3c0e092e 2 --> $DIR/into-str.rs:4:9
532ac7d7
XL
3 |
4LL | foo(String::new());
3c0e092e
XL
5 | --- ^^^^^^^^^^^^^ the trait `From<String>` is not implemented for `&str`
6 | |
7 | required by a bound introduced by this call
532ac7d7 8 |
cdc7bbd5 9 = note: to coerce a `String` into a `&str`, use `&*` as a prefix
04454e1e 10 = help: the following other types implement trait `From<T>`:
fe692bf9 11 <String as From<char>>
5099ac24 12 <String as From<Box<str>>>
04454e1e 13 <String as From<Cow<'a, str>>>
fe692bf9
FG
14 <String as From<&str>>
15 <String as From<&mut str>>
16 <String as From<&String>>
f2b60f7d 17 = note: required for `String` to implement `Into<&str>`
94222f64
XL
18note: required by a bound in `foo`
19 --> $DIR/into-str.rs:1:31
20 |
21LL | fn foo<'a, T>(_t: T) where T: Into<&'a str> {}
22 | ^^^^^^^^^^^^^ required by this bound in `foo`
532ac7d7
XL
23
24error: aborting due to previous error
25
26For more information about this error, try `rustc --explain E0277`.