Use ConstArg
for const param defaults
Now everything that actually affects the type system (i.e., excluding const blocks, enum variant discriminants, etc.) *should* be using `ConstArg`.
This commit is contained in:
parent
67fccb7045
commit
1c49d406b6
12 changed files with 34 additions and 26 deletions
|
@ -304,7 +304,10 @@ impl<'tcx> Visitor<'tcx> for CollectItemTypesVisitor<'tcx> {
|
|||
self.tcx.ensure().type_of(param.def_id);
|
||||
if let Some(default) = default {
|
||||
// need to store default and type of default
|
||||
self.tcx.ensure().type_of(default.def_id);
|
||||
#[allow(irrefutable_let_patterns)] // FIXME
|
||||
if let hir::ConstArgKind::Anon(ac) = default.kind {
|
||||
self.tcx.ensure().type_of(ac.def_id);
|
||||
}
|
||||
self.tcx.ensure().const_param_default(param.def_id);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue