summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-43291.rs
blob: 52b629e35c8b860fc145696be2c6c95b41477ee3 (plain)
1
2
3
4
5
6
7
8
9
// run-pass
pub fn main() {
    assert_eq!(!0usize as *const (), foo(0, 1));
    assert_eq!(!0usize as *const (), (0i8 - 1) as *const ());
}

pub fn foo(a: i8, b: i8) -> *const () {
    (a - b) as *const ()
}