Merge pull request #2544 from flip1995/panic

Check if the panic message was created by the assert-macro
This commit is contained in:
Oliver Schneider 2018-03-17 21:48:43 +01:00 committed by GitHub
commit 03f4ae062d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");