]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-free-region-ordering-caller.stderr
Check user types are well-formed in MIR borrow check
[rust.git] / src / test / ui / regions / regions-free-region-ordering-caller.stderr
1 error[E0623]: lifetime mismatch
2   --> $DIR/regions-free-region-ordering-caller.rs:18:12
3    |
4 LL | fn call2<'a, 'b>(a: &'a usize, b: &'b usize) {
5    |                     ---------     ---------
6    |                     |
7    |                     these two types are declared with different lifetimes...
8 LL |     let z: Option<&'b &'a usize> = None;//~ ERROR E0623
9    |            ^^^^^^^^^^^^^^^^^^^^^ ...but data from `a` flows into `b` here
10
11 error[E0623]: lifetime mismatch
12   --> $DIR/regions-free-region-ordering-caller.rs:23:12
13    |
14 LL | fn call3<'a, 'b>(a: &'a usize, b: &'b usize) {
15    |                     ---------     ---------
16    |                     |
17    |                     these two types are declared with different lifetimes...
18 LL |     let y: Paramd<'a> = Paramd { x: a };
19 LL |     let z: Option<&'b Paramd<'a>> = None;//~ ERROR E0623
20    |            ^^^^^^^^^^^^^^^^^^^^^^ ...but data from `a` flows into `b` here
21
22 error[E0623]: lifetime mismatch
23   --> $DIR/regions-free-region-ordering-caller.rs:27:12
24    |
25 LL | fn call4<'a, 'b>(a: &'a usize, b: &'b usize) {
26    |                     ---------     --------- these two types are declared with different lifetimes...
27 LL |     let z: Option<&'a &'b usize> = None;//~ ERROR E0623
28    |            ^^^^^^^^^^^^^^^^^^^^^ ...but data from `b` flows into `a` here
29
30 error: aborting due to 3 previous errors
31
32 For more information about this error, try `rustc --explain E0623`.