rust/src/test/ui/unify-return-ty.rs
2019-07-27 18:56:16 +03:00

17 lines
313 B
Rust

// 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>(); }