summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-creating-enums.stderr
blob: a95d84629013ead53a2de1e9ca3d02b2fc1d61f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
error[E0515]: cannot return reference to temporary value
  --> $DIR/regions-creating-enums.rs:23:16
   |
LL |         return &Ast::Num((*f)(x));
   |                ^-----------------
   |                ||
   |                |temporary value created here
   |                returns a reference to data owned by the current function

error[E0515]: cannot return reference to temporary value
  --> $DIR/regions-creating-enums.rs:28:16
   |
LL |         return &Ast::Add(m_x, m_y);
   |                ^------------------
   |                ||
   |                |temporary value created here
   |                returns a reference to data owned by the current function

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0515`.