rust/src/test/compile-fail/static-region-bound.rs
2013-03-21 17:31:35 -07:00

10 lines
162 B
Rust

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
}