]>
Commit | Line | Data |
---|---|---|
e74abb32 XL |
1 | // check that reservation impls can't be used as normal impls in positive reasoning. |
2 | ||
3 | #![feature(rustc_attrs)] | |
4 | ||
5 | trait MyTrait { fn foo(&self); } | |
6 | #[rustc_reservation_impl = "foo"] | |
7 | impl MyTrait for () { fn foo(&self) {} } | |
8 | ||
9 | fn main() { | |
10 | <() as MyTrait>::foo(&()); | |
11 | //~^ ERROR the trait bound `(): MyTrait` is not satisfied | |
12 | } |