Assert that HIR nodes are not their own parent.

This commit is contained in:
Camille GILLOT
2022-09-11 15:11:58 +02:00
parent ccb5595df2
commit 51f486931f
4 changed files with 13 additions and 1 deletions

View File

@@ -1256,7 +1256,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(