1 error[E0716]: temporary value dropped while borrowed
2 --> $DIR/promoted-const-drop.rs:13:26
4 LL | let _: &'static A = &A();
5 | ---------- ^^^ creates a temporary value which is freed while still in use
7 | type annotation requires that borrow lasts for `'static`
8 LL | let _: &'static [A] = &[C];
10 | - temporary value is freed at the end of this statement
12 error[E0716]: temporary value dropped while borrowed
13 --> $DIR/promoted-const-drop.rs:14:28
15 LL | let _: &'static [A] = &[C];
16 | ------------ ^^^ creates a temporary value which is freed while still in use
18 | type annotation requires that borrow lasts for `'static`
20 | - temporary value is freed at the end of this statement
22 error: aborting due to 2 previous errors
24 For more information about this error, try `rustc --explain E0716`.