rust/tests/ui/auto-traits/issue-84075.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
307 B
Rust
Raw Normal View History

2021-10-03 15:58:10 +00:00
// 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);
}