We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
eq
1 parent 72f144d commit 59bbbe7Copy full SHA for 59bbbe7
compiler/rustc_middle/src/traits/mod.rs
@@ -206,7 +206,9 @@ pub struct InternedObligationCauseCode<'tcx> {
206
impl<'tcx> From<ObligationCauseCode<'tcx>> for InternedObligationCauseCode<'tcx> {
207
#[inline(always)]
208
fn from(code: ObligationCauseCode<'tcx>) -> Self {
209
- Self { code: if code == MISC_OBLIGATION_CAUSE_CODE { None } else { Some(Lrc::new(code)) } }
+ Self {
210
+ code: if let MISC_OBLIGATION_CAUSE_CODE = code { None } else { Some(Lrc::new(code)) },
211
+ }
212
}
213
214
0 commit comments