Appeasing the Test Gods.

Seems I'm not smart enough to run the tests locally before committing.
This commit is contained in:
daxpedda 2018-12-05 11:26:40 +01:00
parent 978f8c65ee
commit 19db2f1a32
2 changed files with 5 additions and 5 deletions

View file

@ -372,7 +372,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry<'_>, conf: &Conf) {
reg.register_late_lint_pass(box unicode::Unicode);
reg.register_late_lint_pass(box strings::StringAdd);
reg.register_early_lint_pass(box returns::ReturnPass);
reg.register_late_lint_pass(box missing_returns::MissingReturnsPass);
reg.register_late_lint_pass(box missing_returns::Pass);
reg.register_late_lint_pass(box methods::Pass);
reg.register_late_lint_pass(box map_clone::Pass);
reg.register_late_lint_pass(box shadow::Pass);

View file

@ -39,9 +39,9 @@ declare_clippy_lint! {
"use a return statement like `return expr` instead of an expression"
}
pub struct MissingReturnsPass;
pub struct Pass;
impl MissingReturnsPass {
impl Pass {
fn show_suggestion(cx: &LateContext<'_, '_>, span: syntax_pos::Span) {
span_lint_and_then(cx, MISSING_RETURNS, span, "missing return statement", |db| {
if let Some(snippet) = snippet_opt(cx, span) {
@ -80,13 +80,13 @@ impl MissingReturnsPass {
}
}
impl LintPass for MissingReturnsPass {
impl LintPass for Pass {
fn get_lints(&self) -> LintArray {
lint_array!(MISSING_RETURNS)
}
}
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingReturnsPass {
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
fn check_fn(
&mut self,
cx: &LateContext<'a, 'tcx>,