new_named_lifetime_with_res's LifetimeRes::Param should have created def_id already
This commit is contained in:
parent
14ea17858d
commit
3030ab3074
@ -1913,17 +1913,8 @@ fn new_named_lifetime_with_res(
|
||||
if !captured_lifetimes.binders_to_ignore.contains(&binder) {
|
||||
match captured_lifetimes.captures.entry(param) {
|
||||
Entry::Occupied(o) => param = self.local_def_id(o.get().1),
|
||||
Entry::Vacant(v) => {
|
||||
let p_id = self.next_node_id();
|
||||
|
||||
let p_def_id = self.create_def(
|
||||
captured_lifetimes.parent_def_id,
|
||||
p_id,
|
||||
DefPathData::LifetimeNs(p_name.ident().name),
|
||||
);
|
||||
|
||||
v.insert((span, p_id, p_name, res));
|
||||
param = p_def_id;
|
||||
Entry::Vacant(_) => {
|
||||
panic!("Lifetime {:?} should have a def_id at this point", id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user