// run-rustfix
+// aux-build:proc_macros.rs
#![feature(let_chains)]
#![allow(unused)]
#![allow(
clippy::uninlined_format_args
)]
+extern crate proc_macros;
+
use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet};
use std::rc::Rc;
a
}
+#[proc_macros::inline_macros]
fn does_not_lint() {
let z;
if false {
}
y = 3;
- macro_rules! assign {
- ($i:ident) => {
- $i = 1;
- };
- }
let x;
- assign!(x);
+ inline!($x = 1;);
let x;
if true {
- assign!(x);
+ inline!($x = 1;);
} else {
x = 2;
}
- macro_rules! in_macro {
- () => {
- let x;
- x = 1;
+ inline!({
+ let x;
+ x = 1;
- let x;
- if true {
- x = 1;
- } else {
- x = 2;
- }
- };
- }
- in_macro!();
+ let x;
+ if true {
+ x = 1;
+ } else {
+ x = 2;
+ }
+ });
// ignore if-lets - https://github.com/rust-lang/rust-clippy/issues/8613
let x;