summaryrefslogtreecommitdiffstats
path: root/src/test/ui/coherence/coherence-fundamental-trait-objects.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/coherence/coherence-fundamental-trait-objects.rs')
-rw-r--r--src/test/ui/coherence/coherence-fundamental-trait-objects.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/coherence/coherence-fundamental-trait-objects.rs b/src/test/ui/coherence/coherence-fundamental-trait-objects.rs
new file mode 100644
index 000000000..dd127bf7f
--- /dev/null
+++ b/src/test/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() {}