]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unify-return-ty.rs
Pin panic-in-drop=abort test to old pass manager
[rust.git] / src / test / ui / unify-return-ty.rs
1 // run-pass
2 // Tests that the tail expr in null() has its type
3 // unified with the type *T, and so the type variable
4 // in that type gets resolved.
5
6 // pretty-expanded FIXME #23616
7
8 use std::mem;
9
10 fn null<T>() -> *const T {
11     unsafe {
12         mem::transmute(0_usize)
13     }
14 }
15
16 pub fn main() { null::<isize>(); }