]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-creating-enums.stderr
Auto merge of #59114 - matthewjasper:enable-migate-2015, r=pnkfelix
[rust.git] / src / test / ui / regions / regions-creating-enums.stderr
1 error[E0515]: cannot return reference to temporary value
2   --> $DIR/regions-creating-enums.rs:23:16
3    |
4 LL |         return &Ast::Num((*f)(x));
5    |                ^-----------------
6    |                ||
7    |                |temporary value created here
8    |                returns a reference to data owned by the current function
9
10 error[E0515]: cannot return reference to temporary value
11   --> $DIR/regions-creating-enums.rs:28:16
12    |
13 LL |         return &Ast::Add(m_x, m_y);
14    |                ^------------------
15    |                ||
16    |                |temporary value created here
17    |                returns a reference to data owned by the current function
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0515`.