diff options
| author | bors <bors@rust-lang.org> | 2023-03-24 18:40:19 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-24 18:40:19 +0000 |
| commit | 80a933042e4e07ee9d9c20897d4fab595766fef6 (patch) | |
| tree | a4f766b70383a271ff11540d7723d4619b644039 /src/tools/clippy/tests/ui/almost_complete_range.fixed | |
| parent | 31d74fb24bb16317e09f936fbf46590599b02940 (diff) | |
| parent | 50475e864881eb15c01afac83c7aad5e5ff96437 (diff) | |
| download | rust-80a933042e4e07ee9d9c20897d4fab595766fef6.tar.gz rust-80a933042e4e07ee9d9c20897d4fab595766fef6.zip | |
Auto merge of #109566 - flip1995:clippyup, r=Manishearth
Update Clippy r? `@Manishearth` One day late, sorry :neutral_face:
Diffstat (limited to 'src/tools/clippy/tests/ui/almost_complete_range.fixed')
| -rw-r--r-- | src/tools/clippy/tests/ui/almost_complete_range.fixed | 49 |
1 files changed, 17 insertions, 32 deletions
diff --git a/src/tools/clippy/tests/ui/almost_complete_range.fixed b/src/tools/clippy/tests/ui/almost_complete_range.fixed index 6046addf719..a4bf7fe18d5 100644 --- a/src/tools/clippy/tests/ui/almost_complete_range.fixed +++ b/src/tools/clippy/tests/ui/almost_complete_range.fixed @@ -1,6 +1,6 @@ // run-rustfix // edition:2018 -// aux-build:macro_rules.rs +// aux-build:proc_macros.rs #![feature(exclusive_range_pattern)] #![feature(stmt_expr_attributes)] @@ -9,33 +9,10 @@ #![allow(clippy::needless_parens_on_range_literals)] #![allow(clippy::double_parens)] -#[macro_use] -extern crate macro_rules; - -macro_rules! a { - () => { - 'a' - }; -} -macro_rules! A { - () => { - 'A' - }; -} -macro_rules! zero { - () => { - '0' - }; -} - -macro_rules! b { - () => { - let _ = 'a'..='z'; - let _ = 'A'..='Z'; - let _ = '0'..='9'; - }; -} +extern crate proc_macros; +use proc_macros::{external, inline_macros}; +#[inline_macros] fn main() { #[rustfmt::skip] { @@ -56,9 +33,9 @@ fn main() { let _ = b'B'..b'Z'; let _ = b'1'..b'9'; - let _ = a!()..='z'; - let _ = A!()..='Z'; - let _ = zero!()..='9'; + let _ = inline!('a')..='z'; + let _ = inline!('A')..='Z'; + let _ = inline!('0')..='9'; let _ = match 0u8 { b'a'..=b'z' if true => 1, @@ -80,8 +57,16 @@ fn main() { _ => 7, }; - almost_complete_range!(); - b!(); + external!( + let _ = 'a'..'z'; + let _ = 'A'..'Z'; + let _ = '0'..'9'; + ); + inline!( + let _ = 'a'..='z'; + let _ = 'A'..='Z'; + let _ = '0'..='9'; + ); } #[clippy::msrv = "1.25"] |
