diff options
Diffstat (limited to 'tests/ui/coherence/coherence-fundamental-trait-objects.rs')
-rw-r--r-- | tests/ui/coherence/coherence-fundamental-trait-objects.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/coherence/coherence-fundamental-trait-objects.rs b/tests/ui/coherence/coherence-fundamental-trait-objects.rs new file mode 100644 index 000000000..dd127bf7f --- /dev/null +++ b/tests/ui/coherence/coherence-fundamental-trait-objects.rs @@ -0,0 +1,15 @@ +// Check that trait objects from #[fundamental] traits are not +// treated as #[fundamental] types - the 2 meanings of #[fundamental] +// are distinct. + +// aux-build:coherence_fundamental_trait_lib.rs + +extern crate coherence_fundamental_trait_lib; + +use coherence_fundamental_trait_lib::{Fundamental, Misc}; + +pub struct Local; +impl Misc for dyn Fundamental<Local> {} +//~^ ERROR E0117 + +fn main() {} |