rust/src/test/compile-fail/static-region-bound.rs
2013-12-12 00:49:57 -08:00

11 lines
189 B
Rust

#[feature(managed_boxes)];
fn f<T:'static>(_: T) {}
fn main() {
let x = @3;
f(x);
let x = &3;
f(x); //~ ERROR instantiating a type parameter with an incompatible type
}