Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/rustc_errors/src/emitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ impl HumanEmitter {
}
// print out the span location and spacer before we print the annotated source
// to do this, we need to know if this span will be primary
let is_primary = primary_lo.file.name == annotated_file.file.name;
let is_primary = primary_lo.file.stable_id == annotated_file.file.stable_id;
if is_primary {
let loc = primary_lo.clone();
if !self.short_message {
Expand Down Expand Up @@ -3108,7 +3108,7 @@ impl FileWithAnnotatedLines {
) {
for slot in file_vec.iter_mut() {
// Look through each of our files for the one we're adding to
if slot.file.name == file.name {
if slot.file.stable_id == file.stable_id {
// See if we already have a line for it
for line_slot in &mut slot.lines {
if line_slot.line_index == line_index {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_expand/src/proc_macro_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ impl server::Span for Rustc<'_, '_> {
let self_loc = self.psess().source_map().lookup_char_pos(first.lo());
let other_loc = self.psess().source_map().lookup_char_pos(second.lo());

if self_loc.file.name != other_loc.file.name {
if self_loc.file.stable_id != other_loc.file.stable_id {
return None;
}

Expand Down
Loading