]> git.proxmox.com Git - rustc.git/blame - src/test/run-pass/unify-return-ty.rs
New upstream version 1.33.0+dfsg1
[rustc.git] / src / test / run-pass / unify-return-ty.rs
CommitLineData
223e47cc
LB
1// Tests that the tail expr in null() has its type
2// unified with the type *T, and so the type variable
3// in that type gets resolved.
970d7e83 4
c34b1796
AL
5// pretty-expanded FIXME #23616
6
1a4d82fc 7use std::mem;
223e47cc 8
1a4d82fc 9fn null<T>() -> *const T {
223e47cc 10 unsafe {
85aaf69f 11 mem::transmute(0_usize)
223e47cc
LB
12 }
13}
14
c34b1796 15pub fn main() { null::<isize>(); }