summaryrefslogtreecommitdiffstats
path: root/src/test/ui/wf/wf-impl-associated-type-region.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/wf/wf-impl-associated-type-region.rs')
-rw-r--r--src/test/ui/wf/wf-impl-associated-type-region.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/wf/wf-impl-associated-type-region.rs b/src/test/ui/wf/wf-impl-associated-type-region.rs
new file mode 100644
index 000000000..1bf8d3663
--- /dev/null
+++ b/src/test/ui/wf/wf-impl-associated-type-region.rs
@@ -0,0 +1,14 @@
+// Check that we require that associated types in an impl are well-formed.
+
+
+
+pub trait Foo<'a> {
+ type Bar;
+}
+
+impl<'a, T> Foo<'a> for T {
+ type Bar = &'a T; //~ ERROR E0309
+}
+
+
+fn main() { }