parent
6e5a6ffb14
commit
7aa5ea9a4a
9 changed files with 100 additions and 112 deletions
|
@ -14,10 +14,9 @@ impl<'a, 'tcx> RequiredConstsVisitor<'a, 'tcx> {
|
|||
|
||||
impl<'tcx> Visitor<'tcx> for RequiredConstsVisitor<'_, 'tcx> {
|
||||
fn visit_constant(&mut self, constant: &Constant<'tcx>, _: Location) {
|
||||
if let Some(ct) = constant.literal.const_for_ty() {
|
||||
if let ConstKind::Unevaluated(_) = ct.val() {
|
||||
self.required_consts.push(*constant);
|
||||
}
|
||||
let literal = constant.literal;
|
||||
if let Some(ct) = literal.const_for_ty() && let ConstKind::Unevaluated(_) = ct.val() {
|
||||
self.required_consts.push(*constant);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue