|
1 |
| -error[E0515]: cannot return reference to local variable `args` |
| 1 | +error[E0515]: cannot return reference to local binding |
2 | 2 | --> $DIR/return_from_external_macro.rs:7:13
|
3 | 3 | |
|
4 | 4 | LL | drop(|| ret_from_ext::foo!());
|
5 |
| - | ^^^^^^^^^^^^^^^^^^^^ returns a reference to data owned by the current function |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 6 | + | | |
| 7 | + | returns a reference to data owned by the current function |
| 8 | + | local binding introduced here |
6 | 9 | |
|
7 | 10 | = note: this error originates in the macro `ret_from_ext::foo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
8 | 11 |
|
9 |
| -error[E0597]: `args` does not live long enough |
| 12 | +error[E0716]: temporary value dropped while borrowed |
10 | 13 | --> $DIR/return_from_external_macro.rs:10:5
|
11 | 14 | |
|
12 | 15 | LL | ret_from_ext::foo!()
|
13 | 16 | | ^^^^^^^^^^^^^^^^^^^^
|
14 | 17 | | |
|
15 |
| - | borrowed value does not live long enough |
16 |
| - | binding `args` declared here |
17 |
| - | opaque type requires that `args` is borrowed for `'static` |
| 18 | + | creates a temporary value which is freed while still in use |
| 19 | + | opaque type requires that borrow lasts for `'static` |
18 | 20 | LL |
|
19 | 21 | LL | }
|
20 |
| - | - `args` dropped here while still borrowed |
| 22 | + | - temporary value is freed at the end of this statement |
21 | 23 | |
|
22 | 24 | = note: this error originates in the macro `ret_from_ext::foo` (in Nightly builds, run with -Z macro-backtrace for more info)
|
23 | 25 |
|
24 | 26 | error: aborting due to 2 previous errors
|
25 | 27 |
|
26 |
| -Some errors have detailed explanations: E0515, E0597. |
| 28 | +Some errors have detailed explanations: E0515, E0716. |
27 | 29 | For more information about an error, try `rustc --explain E0515`.
|
0 commit comments