mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 17:13:48 +00:00
14 lines
394 B
Rust
14 lines
394 B
Rust
// check that reservation impls can't be used as normal impls in positive reasoning.
|
|
// revisions: old next
|
|
//[next] compile-flags: -Ztrait-solver=next
|
|
#![feature(rustc_attrs)]
|
|
|
|
trait MyTrait { fn foo(&self); }
|
|
#[rustc_reservation_impl = "foo"]
|
|
impl MyTrait for () { fn foo(&self) {} }
|
|
|
|
fn main() {
|
|
<() as MyTrait>::foo(&());
|
|
//~^ ERROR the trait bound `(): MyTrait` is not satisfied
|
|
}
|