9089cf2ec9
This makes custom borrowing implementations for custom smart pointers sound.
11 lines
140 B
Rust
11 lines
140 B
Rust
fn f<T>(x: T) -> @T {
|
|
@x //~ ERROR value may contain borrowed pointers
|
|
}
|
|
|
|
fn g<T:'static>(x: T) -> @T {
|
|
@x // ok
|
|
}
|
|
|
|
fn main() {}
|
|
|