Expose LintLevelsBuilder
with crate root builder
This commit is contained in:
parent
48994b1674
commit
1238a20d38
2 changed files with 14 additions and 0 deletions
|
@ -450,6 +450,19 @@ impl<'s> LintLevelsBuilder<'s, TopDown> {
|
|||
builder
|
||||
}
|
||||
|
||||
pub fn crate_root(
|
||||
sess: &'s Session,
|
||||
features: &'s Features,
|
||||
lint_added_lints: bool,
|
||||
store: &'s LintStore,
|
||||
registered_tools: &'s RegisteredTools,
|
||||
crate_attrs: &[ast::Attribute],
|
||||
) -> Self {
|
||||
let mut builder = Self::new(sess, features, lint_added_lints, store, registered_tools);
|
||||
builder.add(crate_attrs, true, None);
|
||||
builder
|
||||
}
|
||||
|
||||
fn process_command_line(&mut self) {
|
||||
self.provider.cur = self
|
||||
.provider
|
||||
|
|
|
@ -129,6 +129,7 @@ pub use context::{
|
|||
};
|
||||
pub use early::{EarlyCheckNode, check_ast_node};
|
||||
pub use late::{check_crate, late_lint_mod, unerased_lint_store};
|
||||
pub use levels::LintLevelsBuilder;
|
||||
pub use passes::{EarlyLintPass, LateLintPass};
|
||||
pub use rustc_session::lint::Level::{self, *};
|
||||
pub use rustc_session::lint::{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue