mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
14 lines
238 B
Rust
14 lines
238 B
Rust
struct Foo {
|
|
bar: String,
|
|
}
|
|
|
|
impl Foo {
|
|
pub fn new(bar: impl ToString) -> Self {
|
|
Self {
|
|
bar: bar.into(), //~ ERROR the trait bound `String: From<impl ToString>` is not satisfied
|
|
}
|
|
}
|
|
}
|
|
|
|
fn main() {}
|