2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2018-09-25 16:51:35 -05:00
|
|
|
#![allow(dead_code)]
|
2015-03-30 16:49:30 -05:00
|
|
|
// Test that we are able to introduce a negative constraint that
|
|
|
|
// `MyType: !MyTrait` along with other "fundamental" wrappers.
|
|
|
|
|
|
|
|
// aux-build:coherence_copy_like_lib.rs
|
|
|
|
|
|
|
|
extern crate coherence_copy_like_lib as lib;
|
|
|
|
|
|
|
|
struct MyType { x: i32 }
|
|
|
|
|
2015-04-02 12:24:44 -05:00
|
|
|
trait MyTrait { }
|
2015-03-30 16:49:30 -05:00
|
|
|
impl<T: lib::MyCopy> MyTrait for T { }
|
|
|
|
impl MyTrait for MyType { }
|
|
|
|
impl<'a> MyTrait for &'a MyType { }
|
|
|
|
impl MyTrait for Box<MyType> { }
|
|
|
|
impl<'a> MyTrait for &'a Box<MyType> { }
|
|
|
|
|
|
|
|
fn main() { }
|