]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/reservation-impl/no-use.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / traits / reservation-impl / no-use.rs
CommitLineData
e74abb32
XL
1// check that reservation impls can't be used as normal impls in positive reasoning.
2
3#![feature(rustc_attrs)]
4
5trait MyTrait { fn foo(&self); }
6#[rustc_reservation_impl = "foo"]
7impl MyTrait for () { fn foo(&self) {} }
8
9fn main() {
10 <() as MyTrait>::foo(&());
11 //~^ ERROR the trait bound `(): MyTrait` is not satisfied
12}