File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -14,20 +14,21 @@ help: indicate the anonymous lifetime
14
14
21 | fn lifetime_elided(s: &i32) -> UniquePtr<Cpp<'_>>;
15
15
| ++++
16
16
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
18
18
--> tests/ui/deny_elided_lifetimes.rs:21:31
19
19
|
20
20
21 | fn lifetime_elided(s: &i32) -> UniquePtr<Cpp>;
21
- | ^^^^ --- the lifetime gets resolved as `'_`
21
+ | ^^^^ --- the same lifetime is hidden here
22
22
| |
23
- | this lifetime flows to the output
23
+ | the lifetime is elided here
24
24
|
25
+ = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
25
26
note: the lint level is defined here
26
27
--> tests/ui/deny_elided_lifetimes.rs:1:36
27
28
|
28
29
1 | #![deny(elided_lifetimes_in_paths, mismatched_lifetime_syntaxes)]
29
30
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30
- help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
31
+ help: use `'_` for type paths
31
32
|
32
33
21 | fn lifetime_elided(s: &i32) -> UniquePtr<Cpp<'_>>;
33
34
| ++++
You can’t perform that action at this time.
0 commit comments