mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
new_named_lifetime_with_res's LifetimeRes::Fresh should have created def_id already
This commit is contained in:
parent
3030ab3074
commit
d9e6364755
@ -1932,17 +1932,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
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(kw::UnderscoreLifetime),
|
||||
);
|
||||
|
||||
v.insert((span, p_id, ParamName::Fresh, 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