summaryrefslogtreecommitdiffstats
path: root/src/test/ui/coherence/coherence-vec-local.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/coherence/coherence-vec-local.rs')
-rw-r--r--src/test/ui/coherence/coherence-vec-local.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/coherence/coherence-vec-local.rs b/src/test/ui/coherence/coherence-vec-local.rs
new file mode 100644
index 000000000..130cc39d0
--- /dev/null
+++ b/src/test/ui/coherence/coherence-vec-local.rs
@@ -0,0 +1,14 @@
+// Test that a local type (with no type parameters) appearing within a
+// *non-fundamental* remote type like `Vec` is not considered local.
+
+// aux-build:coherence_lib.rs
+
+extern crate coherence_lib as lib;
+use lib::Remote;
+
+struct Local;
+
+impl Remote for Vec<Local> { }
+//~^ ERROR E0117
+
+fn main() { }