summaryrefslogtreecommitdiffstats
path: root/tests/ui/auto-traits/issue-84075.rs
blob: a6afe24ea4c8be988c7530e9ae705ab298f22bac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Regression test for issue #84075.

#![feature(auto_traits)]

auto trait Magic where Self: Copy {} //~ 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);
}