We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1dea922 commit 24d9addCopy full SHA for 24d9add
compiler/rustc_hir_analysis/src/coherence/builtin.rs
@@ -433,14 +433,12 @@ pub fn coerce_unsized_info<'tcx>(
433
// something more accepting, but we use
434
// equality because we want to be able to
435
// perform this check without computing
436
- // variance where possible. (This is because
437
- // we may have to evaluate constraint
+ // variance or constraining opaque types' hidden types.
+ // (This is because we may have to evaluate constraint
438
// expressions in the course of execution.)
439
// See e.g., #41936.
440
- if let Ok(ok) = infcx.at(&cause, param_env).eq(DefineOpaqueTypes::No, a, b) {
441
- if ok.obligations.is_empty() {
442
- return None;
443
- }
+ if a == b {
+ return None;
444
}
445
446
// Collect up all fields that were significantly changed
0 commit comments