[−][src]Static rustc_lint::panic_fmt::NON_FMT_PANIC

static NON_FMT_PANIC: &Lint

The non_fmt_panic lint detects panic!("..") with { or } in the string literal when it is not used as a format string.

Example

panic!("{}");

{{produces}}

Explanation

panic!("{}") panics with the message "{}", as a panic!() invocation with a single argument does not use format_args!(). A future edition of Rust will interpret this string as format string, which would break this.