You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letmut registry = rustc_plugin::registry::Registry::new(state.session, state.krate.as_ref().expect("at this compilation stage the krate must be parsed"));
69
-
registry.args_hidden = Some(Vec::new());
70
-
clippy_lints::register_plugins(&mut registry);
71
-
72
-
let rustc_plugin::registry::Registry{ early_lint_passes,
73
-
late_lint_passes,
74
-
lint_groups,
75
-
llvm_passes,
76
-
attributes,
77
-
mir_passes,
78
-
.. } = registry;
79
-
let sess = &state.session;
80
-
letmut ls = sess.lint_store.borrow_mut();
81
-
for pass in early_lint_passes {
82
-
ls.register_early_pass(Some(sess),true, pass);
83
-
}
84
-
for pass in late_lint_passes {
85
-
ls.register_late_pass(Some(sess),true, pass);
86
-
}
63
+
letmut control = self.default.build_controller(sess, matches);
64
+
65
+
ifself.run_lints{
66
+
let old = std::mem::replace(&mut control.after_parse.callback, box |_| {});
letmut registry = rustc_plugin::registry::Registry::new(state.session, state.krate.as_ref().expect("at this compilation stage the krate must be parsed"));
70
+
registry.args_hidden = Some(Vec::new());
71
+
clippy_lints::register_plugins(&mut registry);
72
+
73
+
let rustc_plugin::registry::Registry{ early_lint_passes,
0 commit comments