mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 15:14:29 +00:00
rustup (don't know the exact PR unfortunately)
This commit is contained in:
parent
cf3fb908c8
commit
33ec4e5220
2 changed files with 2 additions and 2 deletions
|
@ -304,7 +304,7 @@ impl<'c, 'cc> ConstEvalLateContext<'c, 'cc> {
|
|||
};
|
||||
|
||||
let result = self.tcx.const_eval(self.param_env.and(gid)).ok()?;
|
||||
let ret = miri_to_const(self.tcx, result);
|
||||
let ret = miri_to_const(self.tcx, &result);
|
||||
if ret.is_some() {
|
||||
self.needed_resolution = true;
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for UnportableVariant {
|
|||
promoted: None,
|
||||
};
|
||||
let constant = cx.tcx.const_eval(param_env.and(c_id)).ok();
|
||||
if let Some(Constant::Int(val)) = constant.and_then(|c| miri_to_const(cx.tcx, c)) {
|
||||
if let Some(Constant::Int(val)) = constant.and_then(|c| miri_to_const(cx.tcx, &c)) {
|
||||
let mut ty = cx.tcx.type_of(def_id);
|
||||
if let ty::Adt(adt, _) = ty.sty {
|
||||
if adt.is_enum() {
|
||||
|
|
Loading…
Reference in a new issue