Skip to content

Commit 34b4928

Browse files
Wip
1 parent 6451a52 commit 34b4928

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

compiler/rustc_attr_parsing/src/attributes/cfg_trace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rustc_feature::AttributeTemplate;
22
use rustc_hir::attrs::{AttributeKind, CfgEntry};
3-
use rustc_span::{Symbol, sym, Span};
3+
use rustc_span::{Span, Symbol, sym};
44

55
use crate::attributes::{CombineAttributeParser, ConvertFn};
66
use crate::context::{AcceptContext, Stage};

compiler/rustc_hir/src/hir.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,7 @@ impl AttributeExt for Attribute {
13501350
// FIXME: should not be needed anymore when all attrs are parsed
13511351
Attribute::Parsed(AttributeKind::DocComment { span, .. }) => *span,
13521352
Attribute::Parsed(AttributeKind::Deprecation { span, .. }) => *span,
1353+
Attribute::Parsed(AttributeKind::CfgTrace(cfgs)) => cfgs[0].1,
13531354
a => panic!("can't get the span of an arbitrary parsed attribute: {a:?}"),
13541355
}
13551356
}

0 commit comments

Comments
 (0)