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