rust/src/test/ui/traits/traits-inductive-overflow-supertrait-oibit.rs

19 lines
430 B
Rust
Raw Normal View History

// OIBIT-based version of #29859, supertrait version. Test that using
2016-02-09 11:52:39 -05:00
// a simple OIBIT `..` impl alone still doesn't allow arbitrary bounds
// to be synthesized.
#![feature(auto_traits)]
#![feature(negative_impls)]
auto trait Magic: Copy {} //~ ERROR E0568
fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
#[derive(Debug)]
struct NoClone;
fn main() {
let (a, b) = copy(NoClone); //~ ERROR
println!("{:?} {:?}", a, b);
}