We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f27f35 commit b3a3ab1Copy full SHA for b3a3ab1
compiler/rustc_ast/src/visitors.rs
@@ -107,6 +107,22 @@ macro_rules! make_ast_visitor {
107
};
108
}
109
110
+ #[allow(unused)]
111
+ macro_rules! mut_only_visit {
112
+ ($name: ident) => {
113
+ macro_rules! $name {
114
+ ($vis: expr, $arg: expr) => {
115
+ macro_if!{ $($mut)? {
116
+ $name($vis, $arg)
117
+ } else {
118
+ // assign to _ to prevent unused_variable warnings
119
+ {let _ = (&$vis, &$arg);}
120
+ }}
121
+ };
122
+ }
123
124
125
+
126
#[allow(unused)]
127
macro_rules! try_v {
128
($visit: expr) => {
0 commit comments