Skip to content

Commit b222f2e

Browse files
committed
Move note_and_explain_type_err from rustc_middle to rustc_infer
This way we can properly deal with the types.
1 parent 027c850 commit b222f2e

File tree

4 files changed

+657
-634
lines changed

4 files changed

+657
-634
lines changed

compiler/rustc_infer/src/infer/error_reporting/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ use std::path::PathBuf;
7979
use std::{cmp, fmt, iter};
8080

8181
mod note;
82+
mod note_and_explain;
8283
mod suggest;
8384

8485
pub(crate) mod need_type_info;
@@ -1846,7 +1847,9 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
18461847
}
18471848

18481849
self.check_and_note_conflicting_crates(diag, terr);
1849-
self.tcx.note_and_explain_type_err(diag, terr, cause, span, cause.body_id.to_def_id());
1850+
1851+
self.note_and_explain_type_err(diag, terr, cause, span, cause.body_id.to_def_id());
1852+
18501853

18511854
if let Some(ValuePairs::PolyTraitRefs(exp_found)) = values
18521855
&& let ty::Closure(def_id, _) = exp_found.expected.skip_binder().self_ty().kind()

0 commit comments

Comments
 (0)