Skip to content

Commit 5a184ac

Browse files
committed
There's no need to check binders_to_ignore using the old code anymore
1 parent 19dcbd1 commit 5a184ac

File tree

1 file changed

+8
-10
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+8
-10
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,11 +1471,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
14711471
if let Some(mut captured_lifetimes) = self.captured_lifetimes.take() {
14721472
match res {
14731473
LifetimeRes::Param { param, binder } => {
1474-
if !captured_lifetimes.binders_to_ignore.contains(&binder)
1475-
&& !binders_to_ignore
1476-
.get(&lifetime.id)
1477-
.unwrap_or(&Vec::new())
1478-
.contains(&binder)
1474+
if !binders_to_ignore
1475+
.get(&lifetime.id)
1476+
.unwrap_or(&Vec::new())
1477+
.contains(&binder)
14791478
{
14801479
match captured_lifetimes.captures.entry(param) {
14811480
Entry::Occupied(_) => {}
@@ -1497,11 +1496,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
14971496

14981497
LifetimeRes::Fresh { param, binder } => {
14991498
debug_assert_eq!(ident.name, kw::UnderscoreLifetime);
1500-
if !captured_lifetimes.binders_to_ignore.contains(&binder)
1501-
&& !binders_to_ignore
1502-
.get(&lifetime.id)
1503-
.unwrap_or(&Vec::new())
1504-
.contains(&binder)
1499+
if !binders_to_ignore
1500+
.get(&lifetime.id)
1501+
.unwrap_or(&Vec::new())
1502+
.contains(&binder)
15051503
{
15061504
let param = self.local_def_id(param);
15071505
match captured_lifetimes.captures.entry(param) {

0 commit comments

Comments
 (0)