518dc52f85
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
10 lines
247 B
Rust
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>(); }
|