X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=tests%2Fui%2Fmanual_assert.edition2021.fixed;h=d0bc640db88994c7c59312de4dfcb001aa984a78;hb=4bae06d73c8c53e5b0aabc90203f808932d2b021;hp=11fe06c572471cb9f95e5dad3915ceb10d638601;hpb=85e25923e1e818cd71f196a39874c699a445e980;p=rust.git diff --git a/tests/ui/manual_assert.edition2021.fixed b/tests/ui/manual_assert.edition2021.fixed index 11fe06c5724..d0bc640db88 100644 --- a/tests/ui/manual_assert.edition2021.fixed +++ b/tests/ui/manual_assert.edition2021.fixed @@ -2,7 +2,15 @@ // [edition2018] edition:2018 // [edition2021] edition:2021 // run-rustfix + #![warn(clippy::manual_assert)] +#![allow(clippy::nonminimal_bool)] + +macro_rules! one { + () => { + 1 + }; +} fn main() { let a = vec![1, 2, 3]; @@ -40,4 +48,5 @@ fn main() { assert!(!(a.is_empty() && !b.is_empty()), "panic3"); assert!(!(b.is_empty() || a.is_empty()), "panic4"); assert!(!(a.is_empty() || !b.is_empty()), "panic5"); + assert!(!a.is_empty(), "with expansion {}", one!()); }