Skip to content

Commit 736c82f

Browse files
committed
underscore-lifetimes
1 parent 89a65a2 commit 736c82f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/ui/underscore-lifetime/basic-underscore-lifetime-elision.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
//! Checks the correct usage and behavior of the anonymous lifetime `'_` (underscore lifetime)
2+
13
//@ run-pass
24

35
#![allow(dead_code, mismatched_lifetime_syntaxes)]
6+
47
struct Foo<'a>(&'a u8);
58

69
fn foo(x: &u8) -> Foo<'_> {
@@ -31,8 +34,5 @@ fn main() {
3134
let _ = foo2(x);
3235
let _ = foo3(x);
3336
foo4(Foo(x));
34-
let _ = foo5(Foo2 {
35-
a: x,
36-
b: &6,
37-
});
37+
let _ = foo5(Foo2 { a: x, b: &6 });
3838
}

0 commit comments

Comments
 (0)