address review
This commit is contained in:
parent
3f4ad95826
commit
6d94f95a20
2 changed files with 6 additions and 16 deletions
|
|
@ -50,7 +50,7 @@ impl<'tcx> LateLintPass<'tcx> for UnportableVariant {
|
|||
.tcx
|
||||
.const_eval_poly(def_id.to_def_id())
|
||||
.ok()
|
||||
.and_then(|val| Some(rustc_middle::mir::ConstantKind::from_value(val, ty)));
|
||||
.map(|val| rustc_middle::mir::ConstantKind::from_value(val, ty));
|
||||
if let Some(Constant::Int(val)) = constant.and_then(|c| miri_to_const(cx.tcx, c)) {
|
||||
if let ty::Adt(adt, _) = ty.kind() {
|
||||
if adt.is_enum() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue