mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
There's no need to check binders_to_ignore using the old code anymore
This commit is contained in:
parent
19dcbd151b
commit
5a184acfc6
@ -1471,11 +1471,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
if let Some(mut captured_lifetimes) = self.captured_lifetimes.take() {
|
||||
match res {
|
||||
LifetimeRes::Param { param, binder } => {
|
||||
if !captured_lifetimes.binders_to_ignore.contains(&binder)
|
||||
&& !binders_to_ignore
|
||||
.get(&lifetime.id)
|
||||
.unwrap_or(&Vec::new())
|
||||
.contains(&binder)
|
||||
if !binders_to_ignore
|
||||
.get(&lifetime.id)
|
||||
.unwrap_or(&Vec::new())
|
||||
.contains(&binder)
|
||||
{
|
||||
match captured_lifetimes.captures.entry(param) {
|
||||
Entry::Occupied(_) => {}
|
||||
@ -1497,11 +1496,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
|
||||
LifetimeRes::Fresh { param, binder } => {
|
||||
debug_assert_eq!(ident.name, kw::UnderscoreLifetime);
|
||||
if !captured_lifetimes.binders_to_ignore.contains(&binder)
|
||||
&& !binders_to_ignore
|
||||
.get(&lifetime.id)
|
||||
.unwrap_or(&Vec::new())
|
||||
.contains(&binder)
|
||||
if !binders_to_ignore
|
||||
.get(&lifetime.id)
|
||||
.unwrap_or(&Vec::new())
|
||||
.contains(&binder)
|
||||
{
|
||||
let param = self.local_def_id(param);
|
||||
match captured_lifetimes.captures.entry(param) {
|
||||
|
Loading…
Reference in New Issue
Block a user