resolve: Eagerly feed closure visibilities
Also factor out all tcx-dependent operations performed for every created definition into `TyCtxt::create_def`
This commit is contained in:
parent
3095d31a75
commit
5e5d82e803
4 changed files with 23 additions and 22 deletions
|
@ -1225,10 +1225,7 @@ impl<'tcx> Resolver<'_, 'tcx> {
|
|||
);
|
||||
|
||||
// FIXME: remove `def_span` body, pass in the right spans here and call `tcx.at().create_def()`
|
||||
let def_id = self.tcx.untracked().definitions.write().create_def(parent, data);
|
||||
|
||||
let feed = self.tcx.feed_local_def_id(def_id);
|
||||
feed.def_kind(def_kind);
|
||||
let def_id = self.tcx.create_def(parent, name, def_kind);
|
||||
|
||||
// Create the definition.
|
||||
if expn_id != ExpnId::root() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue