d7587c1eda
It is now 1-based, rather than 0 based. (Seems more natural, and allows 0 to be used to refer to self and maybe to closure.) Also allows non-referenced args to be implicitly copied again. Issue #918
8 lines
128 B
Rust
8 lines
128 B
Rust
// error-pattern:can not return a reference to the wrong parameter
|
|
|
|
fn f(a: int, b: int) -> &2 int {
|
|
ret a;
|
|
}
|
|
|
|
fn main() {}
|