mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 11:48:30 +00:00
16 lines
197 B
Rust
16 lines
197 B
Rust
![]() |
//@ run-rustfix
|
||
|
|
||
|
trait Foo {}
|
||
|
|
||
|
impl Foo for fn() {}
|
||
|
|
||
|
trait Bar {
|
||
|
fn do_stuff(&self) where Self: Foo {}
|
||
|
}
|
||
|
impl<T> Bar for T {}
|
||
|
|
||
|
fn main() {
|
||
|
main.do_stuff();
|
||
|
//~^ ERROR the trait bound
|
||
|
}
|