rust/tests/ui/traits/issue-97576.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
238 B
Rust
Raw Normal View History

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() {}