Check for Const param in collect
This commit is contained in:
parent
18ce997e51
commit
2a1b6c52d3
1 changed files with 4 additions and 4 deletions
|
|
@ -1320,10 +1320,10 @@ fn type_of<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> Ty<'tcx> {
|
|||
},
|
||||
|
||||
Node::GenericParam(param) => match ¶m.kind {
|
||||
hir::GenericParamKind::Type {
|
||||
default: Some(ref ty),
|
||||
..
|
||||
} => icx.to_ty(ty),
|
||||
hir::GenericParamKind::Type { default: Some(ref ty), .. } |
|
||||
hir::GenericParamKind::Const { ref ty, .. } => {
|
||||
icx.to_ty(ty)
|
||||
}
|
||||
x => bug!("unexpected non-type Node::GenericParam: {:?}", x),
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue