Only rewrite valtree-constants to patterns and keep other constants opaque
This commit is contained in:
parent
7a2f47c271
commit
d030ece6f7
11 changed files with 235 additions and 174 deletions
|
@ -17,8 +17,8 @@ impl<'tcx> Visitor<'tcx> for RequiredConstsVisitor<'_, 'tcx> {
|
|||
let literal = constant.literal;
|
||||
match literal {
|
||||
ConstantKind::Ty(c) => match c.kind() {
|
||||
ConstKind::Param(_) | ConstKind::Error(_) => {}
|
||||
_ => bug!("only ConstKind::Param should be encountered here, got {:#?}", c),
|
||||
ConstKind::Param(_) | ConstKind::Error(_) | ConstKind::Value(_) => {}
|
||||
_ => bug!("only ConstKind::Param/Value should be encountered here, got {:#?}", c),
|
||||
},
|
||||
ConstantKind::Unevaluated(..) => self.required_consts.push(*constant),
|
||||
ConstantKind::Val(..) => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue