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 }
|
|
|
|
|
2017-02-25 15:16:27 -06:00
|
|
|
trait MyTrait { fn foo() {} }
|
2015-12-29 23:18:24 -06:00
|
|
|
impl<T: lib::MyCopy> MyTrait for T { }
|
2015-03-30 16:49:30 -05:00
|
|
|
|
|
|
|
// Tuples are not fundamental, therefore this would require that
|
|
|
|
//
|
|
|
|
// (MyType,): !MyTrait
|
|
|
|
//
|
|
|
|
// which we cannot approve.
|
2018-12-28 17:11:13 -06:00
|
|
|
impl MyTrait for (MyType,) { }
|
2019-10-26 10:28:02 -05:00
|
|
|
//~^ ERROR E0119
|
2015-03-30 16:49:30 -05:00
|
|
|
|
|
|
|
fn main() { }
|