2016-01-16 10:28:18 +00:00
|
|
|
// OIBIT-based version of #29859, supertrait version. Test that using
|
2016-02-09 16:52:39 +00:00
|
|
|
// a simple OIBIT `..` impl alone still doesn't allow arbitrary bounds
|
2016-01-16 10:28:18 +00:00
|
|
|
// to be synthesized.
|
|
|
|
|
2020-11-23 03:54:31 +00:00
|
|
|
#![feature(auto_traits)]
|
2020-01-09 10:56:38 +00:00
|
|
|
#![feature(negative_impls)]
|
2016-01-16 10:28:18 +00:00
|
|
|
|
2017-12-03 12:56:53 +00:00
|
|
|
auto trait Magic: Copy {} //~ ERROR E0568
|
2016-01-16 10:28:18 +00:00
|
|
|
|
|
|
|
fn copy<T: Magic>(x: T) -> (T, T) { (x, x) }
|
|
|
|
|
|
|
|
#[derive(Debug)]
|
|
|
|
struct NoClone;
|
|
|
|
|
|
|
|
fn main() {
|
2017-12-03 22:07:50 +00:00
|
|
|
let (a, b) = copy(NoClone); //~ ERROR
|
2016-01-16 10:28:18 +00:00
|
|
|
println!("{:?} {:?}", a, b);
|
|
|
|
}
|