rust/src/test/compile-fail/ret-by-reference-wrong-param.rs

8 lines
128 B
Rust
Raw Normal View History

// error-pattern:can not return a reference to the wrong parameter
fn f(a: int, b: int) -> &1 int {
ret a;
}
fn main() {}