There's no need to check binders_to_ignore using the old code anymore
This commit is contained in:
parent
19dcbd151b
commit
5a184acfc6
1 changed files with 8 additions and 10 deletions
|
@ -1471,8 +1471,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
if let Some(mut captured_lifetimes) = self.captured_lifetimes.take() {
|
if let Some(mut captured_lifetimes) = self.captured_lifetimes.take() {
|
||||||
match res {
|
match res {
|
||||||
LifetimeRes::Param { param, binder } => {
|
LifetimeRes::Param { param, binder } => {
|
||||||
if !captured_lifetimes.binders_to_ignore.contains(&binder)
|
if !binders_to_ignore
|
||||||
&& !binders_to_ignore
|
|
||||||
.get(&lifetime.id)
|
.get(&lifetime.id)
|
||||||
.unwrap_or(&Vec::new())
|
.unwrap_or(&Vec::new())
|
||||||
.contains(&binder)
|
.contains(&binder)
|
||||||
|
@ -1497,8 +1496,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||||
|
|
||||||
LifetimeRes::Fresh { param, binder } => {
|
LifetimeRes::Fresh { param, binder } => {
|
||||||
debug_assert_eq!(ident.name, kw::UnderscoreLifetime);
|
debug_assert_eq!(ident.name, kw::UnderscoreLifetime);
|
||||||
if !captured_lifetimes.binders_to_ignore.contains(&binder)
|
if !binders_to_ignore
|
||||||
&& !binders_to_ignore
|
|
||||||
.get(&lifetime.id)
|
.get(&lifetime.id)
|
||||||
.unwrap_or(&Vec::new())
|
.unwrap_or(&Vec::new())
|
||||||
.contains(&binder)
|
.contains(&binder)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue