mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
Check if the panic message was created by the assert-macro
This commit is contained in:
@@ -48,6 +48,7 @@ fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user