blob: 2047593e7e4b81d7c5b330b037aaf4fd32c8e1ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
// aux-build:proc_macros.rs
#![warn(clippy::toplevel_ref_arg)]
#![allow(unused)]
extern crate proc_macros;
use proc_macros::{external, inline_macros};
fn the_answer(ref mut x: u8) {
*x = 42;
}
#[inline_macros]
fn main() {
let mut x = 0;
the_answer(x);
// lint in macro
inline! {
fn fun_example(ref _x: usize) {}
}
// do not lint in external macro
external! {
fn fun_example2(ref _x: usize) {}
}
}
|