-#![feature(plugin)]
-#![plugin(clippy)]
-
-#![warn(panic_params)]
-
+#![warn(clippy::panic_params)]
+#![allow(clippy::assertions_on_constants)]
fn missing() {
if true {
panic!("{}");
} else {
assert!(true, "here be missing values: {}");
}
+
+ panic!("{{{this}}}");
}
fn ok_single() {
}
}
-const ONE : u32= 1;
+const ONE: u32 = 1;
fn ok_nomsg() {
assert!({ 1 == ONE });
assert!(if 1 == ONE { ONE == 1 } else { false });
}
+fn ok_escaped() {
+ panic!("{{ why should this not be ok? }}");
+ panic!(" or {{ that ?");
+ panic!(" or }} this ?");
+ panic!(" {or {{ that ?");
+ panic!(" }or }} this ?");
+ panic!("{{ test }");
+ panic!("{case }}");
+}
+
fn main() {
missing();
ok_single();
ok_bracket();
ok_inner();
ok_nomsg();
+ ok_escaped();
}