blob: 8bdacf2cebb2c57b41c034ca9961f0ce8ceb6394 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// check-pass
#![allow(dead_code)]
#![allow(non_upper_case_globals)]
fn ret() -> u32 {
static x: u32 = 10;
x & if true { 10u32 } else { 20u32 } & x
}
fn ret2() -> &'static u32 {
static x: u32 = 10;
if true { 10u32; } else { 20u32; }
&x
}
fn main() {}
|