fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
698 B15 linesraw
1error[E0277]: the trait bound `&str: std::convert::From<std::string::String>` is not satisfied
2  --> $DIR/into-str.rs:4:5
3   |
4LL | fn foo<'a, T>(_t: T) where T: Into<&'a str> {}
5   |    ---                        ------------- required by this bound in `foo`
6...
7LL |     foo(String::new());
8   |     ^^^ the trait `std::convert::From<std::string::String>` is not implemented for `&str`
9   |
10   = note: to coerce a `std::string::String` into a `&str`, use `&*` as a prefix
11   = note: required because of the requirements on the impl of `std::convert::Into<&str>` for `std::string::String`
12
13error: aborting due to previous error
14
15For more information about this error, try `rustc --explain E0277`.