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