Auto merge of #101688 - cjgillot:verify-hir-parent, r=petrochenkov
Assert that HIR nodes are not their own parent. Fixes https://github.com/rust-lang/rust/issues/101505. Replaces #101513 r? `@petrochenkov` `@nnethercote`
This commit is contained in:
@@ -1289,7 +1289,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
|
||||
return self.lower_path_ty(t, qself, path, ParamMode::Explicit, itctx);
|
||||
}
|
||||
TyKind::ImplicitSelf => {
|
||||
let hir_id = self.lower_node_id(t.id);
|
||||
let hir_id = self.next_id();
|
||||
let res = self.expect_full_res(t.id);
|
||||
let res = self.lower_res(res);
|
||||
hir::TyKind::Path(hir::QPath::Resolved(
|
||||
|
||||
Reference in New Issue
Block a user