fn foo() -> &'static i32 {
const F: &'static i32 = &3;
&F
}
fn main() {
println!("{}", foo());
}
This compiles and prints the right value, as does the same program with the & in front of F removed.
cc @eddyb probably related to the const rvalue promotions change.
This compiles and prints the right value, as does the same program with the
&in front ofFremoved.cc @eddyb probably related to the const rvalue promotions change.