rust/tests/ui/auto-traits/issue-84075.rs
2023-01-11 09:32:08 +00:00

17 lines
307 B
Rust

// 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);
}