Skip to content

Commit

Permalink
use span_help_and_lint() instead of span_lint_and_sugg()
Browse files Browse the repository at this point in the history
  • Loading branch information
rhysd committed Feb 1, 2019
1 parent b52a9bd commit 268ff85
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions clippy_lints/src/dbg_macro.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::utils::span_lint_and_sugg;
use crate::utils::span_help_and_lint;
use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
use rustc::{declare_tool_lint, lint_array};
use rustc_errors::Applicability;
Expand Down Expand Up @@ -41,14 +41,12 @@ impl LintPass for Pass {
impl EarlyLintPass for Pass {
fn check_mac(&mut self, cx: &EarlyContext<'_>, mac: &ast::Mac) {
if mac.node.path == "dbg" {
span_lint_and_sugg(
span_help_and_lint(
cx,
DBG_MACRO,
mac.span,
"`dbg!` macro is intended as a debugging tool",
"ensure to avoid having uses of it in version control",
mac.node.tts.to_string(),
Applicability::MaybeIncorrect,
);
}
}
Expand Down

0 comments on commit 268ff85

Please sign in to comment.