Skip to content

Commit d792cef

Browse files
Rollup merge of #58352 - RalfJung:macro, r=oli-obk
miri value visitor: use `?` in macro
2 parents 585f9a7 + eaf81c2 commit d792cef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_mir/interpret/visitor.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Value<'a, 'mir, 'tcx, M>
125125
}
126126

127127
macro_rules! make_value_visitor {
128-
($visitor_trait_name:ident, $($mutability:ident)*) => {
128+
($visitor_trait_name:ident, $($mutability:ident)?) => {
129129
// How to traverse a value and what to do when we are at the leaves.
130130
pub trait $visitor_trait_name<'a, 'mir, 'tcx: 'mir+'a, M: Machine<'a, 'mir, 'tcx>>: Sized {
131131
type V: Value<'a, 'mir, 'tcx, M>;
132132

133133
/// The visitor must have an `EvalContext` in it.
134-
fn ecx(&$($mutability)* self)
135-
-> &$($mutability)* EvalContext<'a, 'mir, 'tcx, M>;
134+
fn ecx(&$($mutability)? self)
135+
-> &$($mutability)? EvalContext<'a, 'mir, 'tcx, M>;
136136

137137
// Recursive actions, ready to be overloaded.
138138
/// Visit the given value, dispatching as appropriate to more specialized visitors.

0 commit comments

Comments
 (0)