]> git.proxmox.com Git - rustc.git/blame_incremental - src/tools/clippy/tests/ui/toplevel_ref_arg_non_rustfix.rs
bump version to 1.82.0+dfsg1-1~bpo12+pve2
[rustc.git] / src / tools / clippy / tests / ui / toplevel_ref_arg_non_rustfix.rs
... / ...
CommitLineData
1//@aux-build:proc_macros.rs
2
3#![warn(clippy::toplevel_ref_arg)]
4#![allow(unused)]
5
6extern crate proc_macros;
7use proc_macros::{external, inline_macros};
8
9fn the_answer(ref mut x: u8) {
10 *x = 42;
11}
12
13#[inline_macros]
14fn main() {
15 let mut x = 0;
16 the_answer(x);
17
18 // lint in macro
19 inline! {
20 fn fun_example(ref _x: usize) {}
21 }
22
23 // do not lint in external macro
24 external! {
25 fn fun_example2(ref _x: usize) {}
26 }
27}