mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +00:00
17 lines
307 B
Rust
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);
|
|
}
|