Skip to content

Commit

Permalink
remove unnecessary check for opaque types
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Jan 19, 2023
1 parent 65d2f2a commit 0accf08
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions compiler/rustc_const_eval/src/transform/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use rustc_middle::mir::{
ProjectionElem, RetagKind, RuntimePhase, Rvalue, SourceScope, Statement, StatementKind,
Terminator, TerminatorKind, UnOp, START_BLOCK,
};
use rustc_middle::ty::{self, InstanceDef, ParamEnv, Ty, TyCtxt, TypeVisitable};
use rustc_middle::ty::{self, InstanceDef, ParamEnv, Ty, TyCtxt};
use rustc_mir_dataflow::impls::MaybeStorageLive;
use rustc_mir_dataflow::storage::always_storage_live_locals;
use rustc_mir_dataflow::{Analysis, ResultsCursor};
Expand Down Expand Up @@ -230,11 +230,6 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
// Equal types, all is good.
return true;
}
// Normalization reveals opaque types, but we may be validating MIR while computing
// said opaque types, causing cycles.
if (src, dest).has_opaque_types() {
return true;
}

crate::util::is_subtype(self.tcx, self.param_env, src, dest)
}
Expand Down

0 comments on commit 0accf08

Please sign in to comment.