summaryrefslogtreecommitdiffstats
path: root/src/test/ui/typeck/unify-return-ty.rs
blob: da1d82e896ae51a341f43ea6f6024ff2c9b67b7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass
// Tests that the tail expr in null() has its type
// unified with the type *T, and so the type variable
// in that type gets resolved.

// pretty-expanded FIXME #23616

use std::mem;

fn null<T>() -> *const T {
    unsafe {
        mem::transmute(0_usize)
    }
}

pub fn main() { null::<isize>(); }