1
Fork 0

Update with comments

A bunch of nits fixed, and a new test for pretty printing the AST.
This commit is contained in:
kadmin 2021-03-18 06:38:11 +00:00
parent 9fe793ae5d
commit ea2af70466
11 changed files with 69 additions and 17 deletions

View file

@ -258,9 +258,9 @@ impl Visitor<'tcx> for CollectItemTypesVisitor<'tcx> {
let def_id = self.tcx.hir().local_def_id(param.hir_id);
self.tcx.ensure().type_of(def_id);
if let Some(default) = default {
let def_id = self.tcx.hir().local_def_id(default.hir_id);
let default_def_id = self.tcx.hir().local_def_id(default.hir_id);
// need to store default and type of default
self.tcx.ensure().type_of(def_id);
self.tcx.ensure().type_of(default_def_id);
self.tcx.ensure().const_param_default(def_id);
}
}