rust/tests/ui/trait-bounds/issue-82038.rs
Michael Howell 31e5dd3a79 diagnostics: add test case for trait bounds diagnostic
Closes #82038

It was fixed by b8e5ab20ed, a wide-reaching
obligation tracking improvement. This commit adds a test case.
2023-09-07 11:36:23 -07:00

10 lines
186 B
Rust

// Failed bound `bool: Foo` must not point at the `Self: Clone` line
trait Foo {
fn my_method() where Self: Clone;
}
fn main() {
<bool as Foo>::my_method(); //~ERROR [E0277]
}