We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89a65a2 commit 736c82fCopy full SHA for 736c82f
tests/ui/underscore-lifetime/basic-underscore-lifetime-elision.rs
@@ -1,6 +1,9 @@
1
+//! Checks the correct usage and behavior of the anonymous lifetime `'_` (underscore lifetime)
2
+
3
//@ run-pass
4
5
#![allow(dead_code, mismatched_lifetime_syntaxes)]
6
7
struct Foo<'a>(&'a u8);
8
9
fn foo(x: &u8) -> Foo<'_> {
@@ -31,8 +34,5 @@ fn main() {
31
34
let _ = foo2(x);
32
35
let _ = foo3(x);
33
36
foo4(Foo(x));
- let _ = foo5(Foo2 {
- a: x,
- b: &6,
37
- });
+ let _ = foo5(Foo2 { a: x, b: &6 });
38
}
0 commit comments