Skip to content

Commit

Permalink
Ignore generated fresh lifetimes in elision check.
Browse files Browse the repository at this point in the history
  • Loading branch information
uHOOCCOOHu committed Jul 9, 2019
1 parent 5c921a9 commit a9bec0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clippy_lints/src/lifetimes.rs
Expand Up @@ -283,6 +283,8 @@ impl<'v, 't> RefVisitor<'v, 't> {
if let Some(ref lt) = *lifetime {
if lt.name == LifetimeName::Static {
self.lts.push(RefLt::Static);
} else if let LifetimeName::Param(ParamName::Fresh(_)) = lt.name {
// Fresh lifetimes generated should be ignored.
} else if lt.is_elided() {
self.lts.push(RefLt::Unnamed);
} else {
Expand Down

0 comments on commit a9bec0c

Please sign in to comment.