mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Appeasing the Test Gods.
Seems I'm not smart enough to run the tests locally before committing.
This commit is contained in:
parent
978f8c65ee
commit
19db2f1a32
2 changed files with 5 additions and 5 deletions
|
@ -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 unicode::Unicode);
|
||||||
reg.register_late_lint_pass(box strings::StringAdd);
|
reg.register_late_lint_pass(box strings::StringAdd);
|
||||||
reg.register_early_lint_pass(box returns::ReturnPass);
|
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 methods::Pass);
|
||||||
reg.register_late_lint_pass(box map_clone::Pass);
|
reg.register_late_lint_pass(box map_clone::Pass);
|
||||||
reg.register_late_lint_pass(box shadow::Pass);
|
reg.register_late_lint_pass(box shadow::Pass);
|
||||||
|
|
|
@ -39,9 +39,9 @@ declare_clippy_lint! {
|
||||||
"use a return statement like `return expr` instead of an expression"
|
"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) {
|
fn show_suggestion(cx: &LateContext<'_, '_>, span: syntax_pos::Span) {
|
||||||
span_lint_and_then(cx, MISSING_RETURNS, span, "missing return statement", |db| {
|
span_lint_and_then(cx, MISSING_RETURNS, span, "missing return statement", |db| {
|
||||||
if let Some(snippet) = snippet_opt(cx, span) {
|
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 {
|
fn get_lints(&self) -> LintArray {
|
||||||
lint_array!(MISSING_RETURNS)
|
lint_array!(MISSING_RETURNS)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingReturnsPass {
|
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||||
fn check_fn(
|
fn check_fn(
|
||||||
&mut self,
|
&mut self,
|
||||||
cx: &LateContext<'a, 'tcx>,
|
cx: &LateContext<'a, 'tcx>,
|
||||||
|
|
Loading…
Reference in a new issue