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