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
|
2019-07-02 16:30:28 -05:00
|
|
|
// build-pass (FIXME(62277): could be check-pass?)
|
2018-10-31 07:08:01 -05:00
|
|
|
// skip-codgen
|
2015-03-30 16:49:30 -05:00
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
|
|
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-03-30 16:49:30 -05:00
|
|
|
impl<T: lib::MyCopy> MyTrait for T { }
|
|
|
|
|
|
|
|
// `MyFundamentalStruct` is declared fundamental, so we can test that
|
|
|
|
//
|
|
|
|
// MyFundamentalStruct<MyTrait>: !MyTrait
|
|
|
|
//
|
|
|
|
// Huzzah.
|
|
|
|
impl MyTrait for lib::MyFundamentalStruct<MyType> { }
|
|
|
|
|
2018-10-31 07:08:01 -05:00
|
|
|
|
|
|
|
fn main() { }
|