Fix ICE on invalid const param types
This commit is contained in:
parent
3a36386dc1
commit
c62bc31b16
4 changed files with 49 additions and 6 deletions
|
@ -386,6 +386,8 @@ impl<'tcx> HirTyLowerer<'tcx> for ItemCtxt<'tcx> {
|
|||
|
||||
fn ct_infer(&self, ty: Ty<'tcx>, _: Option<&ty::GenericParamDef>, span: Span) -> Const<'tcx> {
|
||||
let ty = self.tcx.fold_regions(ty, |r, _| match *r {
|
||||
rustc_type_ir::RegionKind::ReStatic => r,
|
||||
|
||||
// This is never reached in practice. If it ever is reached,
|
||||
// `ReErased` should be changed to `ReStatic`, and any other region
|
||||
// left alone.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue