Fix dogfood problem
This commit is contained in:
parent
0475eae1fa
commit
fc09eb553e
@ -255,7 +255,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
|
||||
reg.register_late_lint_pass(box let_if_seq::LetIfSeq);
|
||||
reg.register_late_lint_pass(box eval_order_dependence::EvalOrderDependence);
|
||||
reg.register_late_lint_pass(box missing_doc::MissingDoc::new());
|
||||
reg.register_late_lint_pass(box ok_if_let::OkIfLetPass);
|
||||
reg.register_late_lint_pass(box ok_if_let::Pass);
|
||||
|
||||
reg.register_lint_group("clippy_restrictions", vec![
|
||||
arithmetic::FLOAT_ARITHMETIC,
|
||||
|
@ -23,15 +23,15 @@ declare_lint! {
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct OkIfLetPass;
|
||||
pub struct Pass;
|
||||
|
||||
impl LintPass for OkIfLetPass {
|
||||
impl LintPass for Pass {
|
||||
fn get_lints(&self) -> LintArray {
|
||||
lint_array!(IF_LET_SOME_RESULT)
|
||||
}
|
||||
}
|
||||
|
||||
impl LateLintPass for OkIfLetPass {
|
||||
impl LateLintPass for Pass {
|
||||
fn check_expr(&mut self, cx: &LateContext, expr: &Expr) {
|
||||
if_let_chain! {[ //begin checking variables
|
||||
let ExprMatch(ref op, ref body, ref source) = expr.node, //test if expr is a match
|
||||
|
Loading…
Reference in New Issue
Block a user