mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
Check if the panic message was created by the assert-macro
This commit is contained in:
parent
6f3f25878f
commit
4fdc81dd7a
1 changed files with 1 additions and 0 deletions
|
@ -48,6 +48,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
|||
if let Some(par) = string.as_str().find('{');
|
||||
if string.as_str()[par..].contains('}');
|
||||
if params[0].span.source_callee().is_none();
|
||||
if params[0].span.lo() != params[0].span.hi();
|
||||
then {
|
||||
span_lint(cx, PANIC_PARAMS, params[0].span,
|
||||
"you probably are missing some parameter in your format string");
|
||||
|
|
Loading…
Reference in a new issue