We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 190c3ad commit 1993f1eCopy full SHA for 1993f1e
src/test/ui/panic-brace.rs
@@ -15,4 +15,11 @@ fn main() {
15
panic!(S); // No warning (yet)
16
panic!(concat!("{", "}")); //~ WARN panic message contains an unused formatting placeholder
17
panic!(concat!("{", "{")); //~ WARN panic message contains braces
18
+
19
+ // Check that the lint only triggers for std::panic and core::panic,
20
+ // not any panic macro:
21
+ macro_rules! panic {
22
+ ($e:expr) => ();
23
+ }
24
+ panic!("{}"); // OK
25
}
0 commit comments