Move all the heavy lifting from TyCtxtAt::create_def into TyCtxt::create_def

This commit is contained in:
Oli Scherer 2024-02-14 14:45:38 +00:00
parent 2e900edde1
commit 55f9aed9c7
2 changed files with 18 additions and 14 deletions

View file

@ -1245,7 +1245,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.create_def(parent, name, def_kind);
let def_id = self.tcx.create_def(parent, name, def_kind).def_id();
// Create the definition.
if expn_id != ExpnId::root() {