Skip to content

Commit e1b99c1

Browse files
committed
---
yaml --- r: 193478 b: refs/heads/beta c: 10426f6 h: refs/heads/master v: v3
1 parent c440886 commit e1b99c1

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: ab7ef7402bfab1c767b8be80f7e46947494f6d21
34+
refs/heads/beta: 10426f69dac38186c7bb8946743023729d65e1e6
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: de8a23bbc3a7b9cbd7574b5b91a34af59bf030e6

branches/beta/src/libsyntax/feature_gate.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ pub const KNOWN_ATTRIBUTES: &'static [(&'static str, AttributeType)] = &[
285285
("recursion_limit", CrateLevel),
286286
];
287287

288-
#[derive(PartialEq, Copy)]
288+
#[derive(PartialEq, Copy, Debug)]
289289
pub enum AttributeType {
290290
/// Normal, builtin attribute that is consumed
291291
/// by the compiler before the unused_attribute check
@@ -353,7 +353,9 @@ struct Context<'a> {
353353

354354
impl<'a> Context<'a> {
355355
fn gate_feature(&self, feature: &str, span: Span, explain: &str) {
356-
if !self.has_feature(feature) {
356+
let has_feature = self.has_feature(feature);
357+
debug!("gate_feature(feature = {:?}, span = {:?}); has? {}", feature, span, has_feature);
358+
if !has_feature {
357359
emit_feature_err(self.span_handler, feature, span, explain);
358360
}
359361
}
@@ -634,12 +636,14 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> {
634636
}
635637

636638
fn visit_attribute(&mut self, attr: &ast::Attribute) {
639+
debug!("visit_attribute(attr = {:?})", attr);
637640
let name = &*attr.name();
638641
for &(n, ty) in KNOWN_ATTRIBUTES {
639642
if n == name {
640643
if let Gated(gate, desc) = ty {
641644
self.gate_feature(gate, attr.span, desc);
642645
}
646+
debug!("visit_attribute: {:?} is known, {:?}", name, ty);
643647
return;
644648
}
645649
}

0 commit comments

Comments
 (0)