diff options
Diffstat (limited to 'src/tools/clippy/tests/ui/manual_assert.edition2021.fixed')
-rw-r--r-- | src/tools/clippy/tests/ui/manual_assert.edition2021.fixed | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/tools/clippy/tests/ui/manual_assert.edition2021.fixed b/src/tools/clippy/tests/ui/manual_assert.edition2021.fixed index 65598f1ea..2f62de51c 100644 --- a/src/tools/clippy/tests/ui/manual_assert.edition2021.fixed +++ b/src/tools/clippy/tests/ui/manual_assert.edition2021.fixed @@ -1,10 +1,11 @@ // revisions: edition2018 edition2021 -// [edition2018] edition:2018 -// [edition2021] edition:2021 +//[edition2018] edition:2018 +//[edition2021] edition:2021 // 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"); +} |