1
Fork 0

Remove the distinction between LifetimeName::Implicit and LifetimeName::Underscore.

This commit is contained in:
Camille GILLOT 2022-05-22 10:22:20 +02:00
parent a2254d5d7c
commit ab63591f00
7 changed files with 21 additions and 63 deletions

View file

@ -1883,7 +1883,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
}
hir::LifetimeName::Param(param, ParamName::Fresh)
}
LifetimeRes::Anonymous { binder, elided } => {
LifetimeRes::Anonymous { binder } => {
let mut l_name = None;
if let Some(mut captured_lifetimes) = self.captured_lifetimes.take() {
if !captured_lifetimes.binders_to_ignore.contains(&binder) {
@ -1900,11 +1900,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
}
self.captured_lifetimes = Some(captured_lifetimes);
};
l_name.unwrap_or(if elided {
hir::LifetimeName::Implicit
} else {
hir::LifetimeName::Underscore
})
l_name.unwrap_or(hir::LifetimeName::Underscore)
}
LifetimeRes::Static => hir::LifetimeName::Static,
LifetimeRes::Error => hir::LifetimeName::Error,