summaryrefslogtreecommitdiffstats
path: root/src/test/ui/compare-method/region-extra.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/compare-method/region-extra.rs')
-rw-r--r--src/test/ui/compare-method/region-extra.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/compare-method/region-extra.rs b/src/test/ui/compare-method/region-extra.rs
new file mode 100644
index 000000000..1070cb845
--- /dev/null
+++ b/src/test/ui/compare-method/region-extra.rs
@@ -0,0 +1,14 @@
+// Test that you cannot add an extra where clause in the impl relating
+// two regions.
+
+trait Master<'a, 'b> {
+ fn foo();
+}
+
+impl<'a, 'b> Master<'a, 'b> for () {
+ fn foo() where 'a: 'b { } //~ ERROR impl has stricter
+}
+
+fn main() {
+ println!("Hello, world!");
+}