1
Fork 0

Rollup merge of #129203 - compiler-errors:extern_crate_data, r=jieyouxu

Use cnum for extern crate data key

Noticed this when fixing #129184. I still have yet to put up a fix for that (mostly because I'm too lazy to minimize a test, that will come soon though).
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2024-08-18 14:55:23 +08:00 committed by GitHub
commit 130cb9e30c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 10 deletions

View file

@ -1668,7 +1668,7 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
let name = self.tcx.crate_name(trait_def_id.krate);
let spans: Vec<_> = [trait_def_id, found_type]
.into_iter()
.filter_map(|def_id| self.tcx.extern_crate(def_id))
.filter_map(|def_id| self.tcx.extern_crate(def_id.krate))
.map(|data| {
let dependency = if data.dependency_of == LOCAL_CRATE {
"direct dependency of the current crate".to_string()