summaryrefslogtreecommitdiffstats
path: root/tests/ui/auto-traits/typeck-auto-trait-no-supertraits-2.rs
blob: 98359ef51b764c249f2056b486b031442689c458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![feature(auto_traits)]
#![feature(negative_impls)]

auto trait Magic : Sized where Option<Self> : Magic {} //~ ERROR E0568
//~^ ERROR E0568
impl<T:Magic> Magic for T {}

fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }

#[derive(Debug)]
struct NoClone;

fn main() {
    let (a, b) = copy(NoClone);
    println!("{:?} {:?}", a, b);
}