Skip to content

Commit 03679a4

Browse files
committed
Update ui test suite to nightly-2025-07-18
1 parent 7592187 commit 03679a4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/ui/deny_elided_lifetimes.stderr

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,21 @@ help: indicate the anonymous lifetime
1414
21 | fn lifetime_elided(s: &i32) -> UniquePtr<Cpp<'_>>;
1515
| ++++
1616

17-
error: lifetime flowing from input to output with different syntax can be confusing
17+
error: hiding a lifetime that's elided elsewhere is confusing
1818
--> tests/ui/deny_elided_lifetimes.rs:21:31
1919
|
2020
21 | fn lifetime_elided(s: &i32) -> UniquePtr<Cpp>;
21-
| ^^^^ --- the lifetime gets resolved as `'_`
21+
| ^^^^ --- the same lifetime is hidden here
2222
| |
23-
| this lifetime flows to the output
23+
| the lifetime is elided here
2424
|
25+
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
2526
note: the lint level is defined here
2627
--> tests/ui/deny_elided_lifetimes.rs:1:36
2728
|
2829
1 | #![deny(elided_lifetimes_in_paths, mismatched_lifetime_syntaxes)]
2930
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30-
help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
31+
help: use `'_` for type paths
3132
|
3233
21 | fn lifetime_elided(s: &i32) -> UniquePtr<Cpp<'_>>;
3334
| ++++

0 commit comments

Comments
 (0)