• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Auto-trait-based version of #29859, supertrait version. Test that using
2 // a simple auto trait `..` impl alone still doesn't allow arbitrary bounds
3 // to be synthesized.
4 
5 #![feature(auto_traits)]
6 #![feature(negative_impls)]
7 
8 auto trait Magic: Copy {} //~ ERROR E0568
9 
copy<T: Magic>(x: T) -> (T, T)10 fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
11 
12 #[derive(Debug)]
13 struct NoClone;
14 
main()15 fn main() {
16     let (a, b) = copy(NoClone); //~ ERROR
17     println!("{:?} {:?}", a, b);
18 }
19