2019-07-13 22:52:57 +03:00
|
|
|
// check that reservation impls can't be used as normal impls in positive reasoning.
|
2023-03-21 16:26:23 +01:00
|
|
|
// revisions: old next
|
|
|
|
//[next] compile-flags: -Ztrait-solver=next
|
2019-07-13 22:52:57 +03:00
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
|
|
|
trait MyTrait { fn foo(&self); }
|
2019-07-27 22:18:34 +03:00
|
|
|
#[rustc_reservation_impl = "foo"]
|
2019-07-13 22:52:57 +03:00
|
|
|
impl MyTrait for () { fn foo(&self) {} }
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
<() as MyTrait>::foo(&());
|
|
|
|
//~^ ERROR the trait bound `(): MyTrait` is not satisfied
|
|
|
|
}
|