summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-33537.rs
blob: 3539aa64776ab4792b387b846466345403bc8914 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// run-pass

const fn foo() -> *const i8 {
    b"foo" as *const _ as *const i8
}

const fn bar() -> i32 {
    *&{(1, 2, 3).1}
}

fn main() {
    assert_eq!(foo(), b"foo" as *const _ as *const i8);
    assert_eq!(bar(), 2);
}