]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/tests/ui/manual_assert.edition2018.fixed
Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup
[rust.git] / src / tools / clippy / tests / ui / manual_assert.edition2018.fixed
index 65598f1eaccc54e928026ccdad249f28f43711a6..26e3b8f63e700e2a53f579df14bbaf5ac5728452 100644 (file)
@@ -4,7 +4,8 @@
 // run-rustfix
 
 #![warn(clippy::manual_assert)]
-#![allow(clippy::nonminimal_bool)]
+#![allow(dead_code, unused_doc_comments)]
+#![allow(clippy::nonminimal_bool, clippy::uninlined_format_args)]
 
 macro_rules! one {
     () => {
@@ -50,3 +51,14 @@ fn main() {
     assert!(!(a.is_empty() || !b.is_empty()), "panic5");
     assert!(!a.is_empty(), "with expansion {}", one!());
 }
+
+fn issue7730(a: u8) {
+    // Suggestion should preserve comment
+    // comment
+/* this is a
+        multiline
+        comment */
+/// Doc comment
+// comment after `panic!`
+assert!(!(a > 2), "panic with comment");
+}