Fix dogfood problem

This commit is contained in:
mcarton 2016-10-06 17:50:11 +02:00
parent 0475eae1fa
commit fc09eb553e
No known key found for this signature in database
GPG Key ID: 5E427C794CBA45E8
2 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -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