diff options
Diffstat (limited to 'tests/ui/manual_assert.edition2018.fixed')
| -rw-r--r-- | tests/ui/manual_assert.edition2018.fixed | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/ui/manual_assert.edition2018.fixed b/tests/ui/manual_assert.edition2018.fixed index 65598f1eacc..b5ccc07e49e 100644 --- a/tests/ui/manual_assert.edition2018.fixed +++ b/tests/ui/manual_assert.edition2018.fixed @@ -5,6 +5,7 @@ #![warn(clippy::manual_assert)] #![allow(clippy::nonminimal_bool)] +#![allow(dead_code)] macro_rules! one { () => { @@ -27,8 +28,8 @@ fn main() { { panic!("qaqaq{:?}", a); } - assert!(a.is_empty(), "qaqaq{:?}", a); - assert!(a.is_empty(), "qwqwq"); + assert!(!(!a.is_empty()), "qaqaq{:?}", a); + assert!(!(!a.is_empty()), "qwqwq"); if a.len() == 3 { println!("qwq"); println!("qwq"); @@ -50,3 +51,14 @@ fn main() { assert!(!(a.is_empty() || !b.is_empty()), "panic5"); assert!(!a.is_empty(), "with expansion {}", one!()); } + +fn issue7730() { + // Suggestion should preserve comment + // comment +/* this is a + multiline + comment */ +/// Doc comment +// comment after `panic!` +assert!(!true, "panic with comment"); +} |
