summary refs log tree commit diff
path: root/src/test/ui/impl-trait
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2019-07-02 14:23:38 -0400
committerNiko Matsakis <niko@alum.mit.edu>2019-07-02 14:23:38 -0400
commitf7e00a55bba51de1d58f829b562f9aff05d543f3 (patch)
treea658b2a8a52bf4f11f1cc07530a1b2a0e6646f20 /src/test/ui/impl-trait
parent0c2c2416bfc312f9d119b6ec13773d9e6a49ee90 (diff)
downloadrust-f7e00a55bba51de1d58f829b562f9aff05d543f3.tar.gz
rust-f7e00a55bba51de1d58f829b562f9aff05d543f3.zip
fix ICE with delay-span-bug
Diffstat (limited to 'src/test/ui/impl-trait')
-rw-r--r--src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.nll.stderr9
-rw-r--r--src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.nll.stderr9
2 files changed, 18 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.nll.stderr b/src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.nll.stderr
new file mode 100644
index 00000000000..a255c48ec6e
--- /dev/null
+++ b/src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unrelated.nll.stderr
@@ -0,0 +1,9 @@
+error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
+  --> $DIR/ordinary-bounds-unrelated.rs:18:74
+   |
+LL | fn upper_bounds<'a, 'b, 'c, 'd, 'e>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'d, 'e>
+   |                                                                          ^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0700`.
diff --git a/src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.nll.stderr b/src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.nll.stderr
new file mode 100644
index 00000000000..af42ed1c5c1
--- /dev/null
+++ b/src/test/ui/impl-trait/multiple-lifetimes/ordinary-bounds-unsuited.nll.stderr
@@ -0,0 +1,9 @@
+error[E0700]: hidden type for `impl Trait` captures lifetime that does not appear in bounds
+  --> $DIR/ordinary-bounds-unsuited.rs:20:62
+   |
+LL | fn upper_bounds<'a, 'b>(a: Ordinary<'a>, b: Ordinary<'b>) -> impl Trait<'a, 'b>
+   |                                                              ^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0700`.