rust/src/test/ui/dropck/dropck-eyepatch-reorder.ast.stderr
Felix S. Klock II cf71582718 Use // revisions in the dropck-eyepatch tests instead of relying on compare-mode=nll.
NLL has increased precision in its analysis of drop order, and we want
the test annotations to deliberately reflect this by having fewer
ERROR annotations for NLL than for AST-borrowck. The best way to get
this effect is via `// revisions`.

As a drive-by, also added uses of all the borrows just to make it
clear that NLL isn't somehow sidestepping things by using shorter
borrows than you might have otherwise expected. (Of course, the added
uses do not make all that much difference since the relevant types all
declare `impl Drop` and thus those drops have implicit uses anyway.)
2018-11-05 16:19:51 +01:00

70 lines
2.2 KiB
Plaintext

error[E0597]: `c` does not live long enough
--> $DIR/dropck-eyepatch-reorder.rs:58:20
|
LL | dt = Dt("dt", &c);
| ^ borrowed value does not live long enough
...
LL | }
| - `c` dropped here while still borrowed
|
= note: values in a scope are dropped in the opposite order they are created
error[E0597]: `c` does not live long enough
--> $DIR/dropck-eyepatch-reorder.rs:60:20
|
LL | dr = Dr("dr", &c);
| ^ borrowed value does not live long enough
...
LL | }
| - `c` dropped here while still borrowed
|
= note: values in a scope are dropped in the opposite order they are created
error[E0597]: `c_shortest` does not live long enough
--> $DIR/dropck-eyepatch-reorder.rs:64:20
|
LL | dt = Dt("dt", &c_shortest);
| ^^^^^^^^^^ borrowed value does not live long enough
...
LL | }
| - `c_shortest` dropped here while still borrowed
|
= note: values in a scope are dropped in the opposite order they are created
error[E0597]: `c_shortest` does not live long enough
--> $DIR/dropck-eyepatch-reorder.rs:67:20
|
LL | dr = Dr("dr", &c_shortest);
| ^^^^^^^^^^ borrowed value does not live long enough
...
LL | }
| - `c_shortest` dropped here while still borrowed
|
= note: values in a scope are dropped in the opposite order they are created
error[E0597]: `c_shortest` does not live long enough
--> $DIR/dropck-eyepatch-reorder.rs:74:29
|
LL | pt = Pt("pt", &c_long, &c_shortest);
| ^^^^^^^^^^ borrowed value does not live long enough
...
LL | }
| - `c_shortest` dropped here while still borrowed
|
= note: values in a scope are dropped in the opposite order they are created
error[E0597]: `c_shortest` does not live long enough
--> $DIR/dropck-eyepatch-reorder.rs:76:29
|
LL | pr = Pr("pr", &c_long, &c_shortest);
| ^^^^^^^^^^ borrowed value does not live long enough
...
LL | }
| - `c_shortest` dropped here while still borrowed
|
= note: values in a scope are dropped in the opposite order they are created
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0597`.