Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Dal Maso committed Jun 18, 2019
1 parent acbc72f commit 542ed89
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/main_recursion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
use rustc::{declare_tool_lint, impl_lint_pass};
use syntax::symbol::sym;

use crate::utils::{is_entrypoint_fn, span_help_and_lint, };
use crate::utils::{is_entrypoint_fn, span_help_and_lint, snippet};
use if_chain::if_chain;

declare_clippy_lint! {
Expand Down Expand Up @@ -59,7 +59,7 @@ impl LateLintPass<'_, '_> for MainRecursion {
cx,
MAIN_RECURSION,
func.span,
"recursing into entrypoint `main()`",
&format!("recursing into entrypoint `{}`", snippet(cx, func.span, "main")),
"consider using another function for this recursion"
)
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/crate_level_checks/entrypoint_recursion.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: recursing into entrypoint `main()`
error: recursing into entrypoint `a`
--> $DIR/entrypoint_recursion.rs:8:5
|
LL | a();
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/crate_level_checks/std_main_recursion.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: recursing into entrypoint `main()`
error: recursing into entrypoint `main`
--> $DIR/std_main_recursion.rs:5:5
|
LL | main();
Expand Down

0 comments on commit 542ed89

Please sign in to comment.