mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-04 22:17:38 +00:00
10 lines
162 B
Rust
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
|
||
|
}
|
||
|
|