Skip to content

Commit 91d1a3f

Browse files
committed
only keep peel_ctxt removed
1 parent a220652 commit 91d1a3f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Diff for: compiler/rustc_errors/src/emitter.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
use Destination::*;
1111

1212
use rustc_span::source_map::SourceMap;
13-
// use rustc_span::{DesugaringKind, FileLines, SourceFile, Span};
14-
use rustc_span::{FileLines, SourceFile, Span};
13+
use rustc_span::{DesugaringKind, FileLines, SourceFile, Span};
14+
// use rustc_span::{FileLines, SourceFile, Span};
1515

1616
use crate::snippet::{
1717
Annotation, AnnotationColumn, AnnotationType, Line, MultilineAnnotation, Style, StyledString,
@@ -406,7 +406,7 @@ pub trait Emitter: Translate {
406406
for (i, trace) in macro_backtrace.iter().rev().enumerate().filter(|(_, trace)| {
407407
!matches!(
408408
trace.kind,
409-
ExpnKind::Inlined //| ExpnKind::Desugaring(DesugaringKind::Resize)
409+
ExpnKind::Inlined | ExpnKind::Desugaring(DesugaringKind::Resize)
410410
) && !trace.def_site.is_dummy()
411411
}) {
412412
if always_backtrace {

Diff for: compiler/rustc_span/src/hygiene.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1156,10 +1156,10 @@ pub enum DesugaringKind {
11561156
ForLoop,
11571157
WhileLoop,
11581158
Replace,
1159-
// /// Used to proactively mark `Span`s that have been modified from another `Span`. This allows
1160-
// /// the diagnostics machinery to be able to detect spans coming from proc-macros that do not
1161-
// /// point to user code.
1162-
// Resize,
1159+
/// Used to proactively mark `Span`s that have been modified from another `Span`. This allows
1160+
/// the diagnostics machinery to be able to detect spans coming from proc-macros that do not
1161+
/// point to user code.
1162+
Resize,
11631163
}
11641164

11651165
impl DesugaringKind {
@@ -1176,7 +1176,7 @@ impl DesugaringKind {
11761176
DesugaringKind::ForLoop => "`for` loop",
11771177
DesugaringKind::WhileLoop => "`while` loop",
11781178
DesugaringKind::Replace => "drop and replace",
1179-
// DesugaringKind::Resize => "a resized `Span`",
1179+
DesugaringKind::Resize => "a resized `Span`",
11801180
}
11811181
}
11821182
}

0 commit comments

Comments
 (0)