]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/const_let_promote.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / consts / const_let_promote.rs
CommitLineData
60c5eb7d
XL
1// run-pass
2
3use std::cell::Cell;
4
5const X: Option<Cell<i32>> = None;
6
7const Y: Option<Cell<i32>> = {
8 let x = None;
9 x
10};
11
12// Ensure that binding the final value of a `const` to a variable does not affect promotion.
13#[allow(unused)]
14fn main() {
15 let x: &'static _ = &X;
16 let y: &'static _ = &Y;
17}