]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/dont_promote_unstable_const_fn_cross_crate.stderr
Auto merge of #58972 - QuietMisdreavus:intra-doc-link-imports, r=GuillaumeGomez
[rust.git] / src / test / ui / consts / const-eval / dont_promote_unstable_const_fn_cross_crate.stderr
1 error[E0597]: borrowed value does not live long enough
2   --> $DIR/dont_promote_unstable_const_fn_cross_crate.rs:8:28
3    |
4 LL |     let _: &'static u32 = &foo();
5    |                            ^^^^^ temporary value does not live long enough
6 LL |     let _x: &'static u32 = &foo();
7 LL | }
8    | - temporary value only lives until here
9    |
10    = note: borrowed value must be valid for the static lifetime...
11
12 error[E0597]: borrowed value does not live long enough
13   --> $DIR/dont_promote_unstable_const_fn_cross_crate.rs:9:29
14    |
15 LL |     let _x: &'static u32 = &foo();
16    |                             ^^^^^ temporary value does not live long enough
17 LL | }
18    | - temporary value only lives until here
19    |
20    = note: borrowed value must be valid for the static lifetime...
21
22 error: aborting due to 2 previous errors
23
24 For more information about this error, try `rustc --explain E0597`.