Allow attributes to be marked used before cfg
proccessing.
This commit is contained in:
parent
8787a12334
commit
b08043ee69
@ -19,6 +19,7 @@
|
||||
use rustc::lint;
|
||||
use rustc::session::Session;
|
||||
use syntax::ast::*;
|
||||
use syntax::attr;
|
||||
use syntax::parse::token::{self, keywords};
|
||||
use syntax::visit::{self, Visitor};
|
||||
use syntax_pos::Span;
|
||||
@ -168,6 +169,10 @@ impl<'a> Visitor for AstValidator<'a> {
|
||||
}
|
||||
}
|
||||
}
|
||||
ItemKind::Mod(_) => {
|
||||
// Ensure that `path` attributes on modules are recorded as used (c.f. #35584).
|
||||
attr::first_attr_value_str_by_name(&item.attrs, "path");
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user