Skip to content

Commit fd4ad63

Browse files
committed
Allow attributes to be marked used before cfg proccessing.
1 parent 8c821d9 commit fd4ad63

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/librustc_passes/ast_validation.rs

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use rustc::lint;
2020
use rustc::session::Session;
2121
use syntax::ast::*;
22+
use syntax::attr;
2223
use syntax::parse::token::{self, keywords};
2324
use syntax::visit::{self, Visitor};
2425
use syntax_pos::Span;
@@ -168,6 +169,10 @@ impl<'a> Visitor for AstValidator<'a> {
168169
}
169170
}
170171
}
172+
ItemKind::Mod(_) => {
173+
// Ensure that `path` attributes on modules are recorded as used (c.f. #35584).
174+
attr::first_attr_value_str_by_name(&item.attrs, "path");
175+
}
171176
_ => {}
172177
}
173178

0 commit comments

Comments
 (0)