Rollup merge of #121084 - oli-obk:create_def_forever_red2, r=WaffleLapkin
Make sure `tcx.create_def` also depends on the forever red node, instead of just `tcx.at(span).create_def` oversight from https://github.com/rust-lang/rust/pull/119136 Not actually an issue, because all uses of `tcx.create_def` were in the resolver, which is `eval_always`, but still good to harden against future uses of `create_def` cc `@petrochenkov` `@WaffleLapkin`
This commit is contained in:
commit
f62d981a18
2 changed files with 18 additions and 14 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue