1 error[E0515]: cannot return value referencing temporary value
2 --> $DIR/regions-lifetime-of-struct-or-enum-variant.rs:15:3
4 LL | let testValue = &id(Test);
5 | -------- temporary value created here
7 | ^^^^^^^^^ returns a value referencing data owned by the current function
9 error[E0515]: cannot return value referencing temporary value
10 --> $DIR/regions-lifetime-of-struct-or-enum-variant.rs:21:3
12 LL | let testValue = &id(MyEnum::Variant1);
13 | -------------------- temporary value created here
15 | ^^^^^^^^^ returns a value referencing data owned by the current function
17 error: aborting due to 2 previous errors
19 For more information about this error, try `rustc --explain E0515`.