-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
needless-lifetime / nested elision sites / PR remarks
- Loading branch information
Showing
4 changed files
with
102 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) | ||
--> $DIR/ice-2774.rs:17:1 | ||
| | ||
LL | pub fn add_barfoos_to_foos<'a>(bars: &HashSet<&'a Bar>) { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: `-D clippy::needless-lifetimes` implied by `-D warnings` | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) | ||
--> $DIR/needless_lifetimes_impl_trait.rs:17:5 | ||
| | ||
LL | fn baz<'a>(&'a self) -> impl Foo + 'a { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: the lint level is defined here | ||
--> $DIR/needless_lifetimes_impl_trait.rs:3:9 | ||
| | ||
LL | #![deny(clippy::needless_lifetimes)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters