rust/src/test/run-pass/unify-return-ty.rs
Brian Anderson 518dc52f85 Reformat
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00

10 lines
247 B
Rust

// 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.
use std;
import std::unsafe;
fn null<T>() -> *T { unsafe::reinterpret_cast(0) }
fn main() { null::<int>(); }