about summary refs log tree commit diff
path: root/src/test/ui/compile-fail-migration/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/compile-fail-migration/region-multiple-lifetime-bounds-on-fns-where-clause.stderr')
-rw-r--r--src/test/ui/compile-fail-migration/region-multiple-lifetime-bounds-on-fns-where-clause.stderr42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/test/ui/compile-fail-migration/region-multiple-lifetime-bounds-on-fns-where-clause.stderr b/src/test/ui/compile-fail-migration/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
new file mode 100644
index 00000000000..26e24b2ed16
--- /dev/null
+++ b/src/test/ui/compile-fail-migration/region-multiple-lifetime-bounds-on-fns-where-clause.stderr
@@ -0,0 +1,42 @@
+error[E0623]: lifetime mismatch
+  --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:19:10
+   |
+LL | fn b<'a, 'b, 'c>(x: &mut &'a isize, y: &mut &'b isize, z: &mut &'c isize) {
+   |                          ---------          --------- these two types are declared with different lifetimes...
+LL |     // Illegal now because there is no `'b:'a` declaration.
+LL |     *x = *y; //~ ERROR E0623
+   |          ^^ ...but data from `y` flows into `x` here
+
+error[E0623]: lifetime mismatch
+  --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:20:10
+   |
+LL | fn b<'a, 'b, 'c>(x: &mut &'a isize, y: &mut &'b isize, z: &mut &'c isize) {
+   |                                             ---------          ---------
+   |                                             |
+   |                                             these two types are declared with different lifetimes...
+...
+LL |     *z = *y; //~ ERROR E0623
+   |          ^^ ...but data from `y` flows into `z` here
+
+error[E0623]: lifetime mismatch
+  --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:26:7
+   |
+LL | fn c<'a,'b, 'c>(x: &mut &'a isize, y: &mut &'b isize, z: &mut &'c isize) {
+   |                         ---------          --------- these two types are declared with different lifetimes...
+...
+LL |     a(x, y, z); //~ ERROR 26:7: 26:8: lifetime mismatch [E0623]
+   |       ^ ...but data from `y` flows into `x` here
+
+error[E0308]: mismatched types
+  --> $DIR/region-multiple-lifetime-bounds-on-fns-where-clause.rs:32:56
+   |
+LL |     let _: fn(&mut &isize, &mut &isize, &mut &isize) = a; //~ ERROR mismatched types
+   |                                                        ^ expected concrete lifetime, found bound lifetime parameter
+   |
+   = note: expected type `for<'r, 's, 't0, 't1, 't2, 't3> fn(&'r mut &'s isize, &'t0 mut &'t1 isize, &'t2 mut &'t3 isize)`
+              found type `for<'r, 's, 't0> fn(&'r mut &isize, &'s mut &isize, &'t0 mut &isize) {a::<'_, '_, '_>}`
+
+error: aborting due to 4 previous errors
+
+Some errors occurred: E0308, E0623.
+For more information about an error, try `rustc --explain E0308`.