about summary refs log tree commit diff
path: root/src/test/compile-fail/ret-by-reference-wrong-param.rs
blob: 7c4791248057789705b1fbfb32b5f593d02822c8 (plain)
1
2
3
4
5
6
7
// error-pattern:can not return a reference to the wrong parameter

fn f(a: int, b: int) -> &2 int {
    ret a;
}

fn main() {}