From 2a1b6c52d34aa021a3930fdea954b3228fba0f71 Mon Sep 17 00:00:00 2001 From: varkor Date: Sat, 16 Feb 2019 13:03:30 +0000 Subject: [PATCH] Check for Const param in collect --- src/librustc_typeck/collect.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs index db508a57726..8f382243bb5 100644 --- a/src/librustc_typeck/collect.rs +++ b/src/librustc_typeck/collect.rs @@ -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), }, -- 2.44.0