]> git.proxmox.com Git - rustc.git/blame - src/test/ui/coherence/coherence_copy_like.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / coherence / coherence_copy_like.rs
CommitLineData
b7449926 1// run-pass
0bf4aa26 2#![allow(dead_code)]
c34b1796
AL
3// Test that we are able to introduce a negative constraint that
4// `MyType: !MyTrait` along with other "fundamental" wrappers.
223e47cc 5
c34b1796 6// aux-build:coherence_copy_like_lib.rs
1a4d82fc 7
c34b1796
AL
8extern crate coherence_copy_like_lib as lib;
9
c34b1796
AL
10struct MyType { x: i32 }
11
9346a6ac 12trait MyTrait { }
c34b1796
AL
13impl<T: lib::MyCopy> MyTrait for T { }
14impl MyTrait for MyType { }
15impl<'a> MyTrait for &'a MyType { }
16impl MyTrait for Box<MyType> { }
17impl<'a> MyTrait for &'a Box<MyType> { }
223e47cc
LB
18
19fn main() { }