Skip to content

Commit 4abcf28

Browse files
committed
adding compile-fail test
1 parent 5be4fa8 commit 4abcf28

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// FIXME - This test gives different results on different machines.
1112
fn invoke<'a, F>(x: &'a i32, f: F) -> &'a i32
1213
where F: FnOnce(&'a i32, &i32) -> &'a i32
1314
{
1415
let y = 22;
1516
f(x, &y)
1617
}
1718

18-
fn foo<'a>(x: &'a i32) {
19+
fn foo<'a>(x: &'a i32) { //~ ERROR E0495
1920
invoke(&x, |a, b| if a > b { a } else { b });
2021
}
2122

22-
fn main() {
23-
}
24-
23+
fn main() {}

src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-closure.stderr

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)