]> git.lizzy.rs Git - rust.git/commitdiff
miri value visitor: use in macro
authorRalf Jung <post@ralfj.de>
Sun, 10 Feb 2019 14:16:25 +0000 (15:16 +0100)
committerRalf Jung <post@ralfj.de>
Sun, 10 Feb 2019 14:16:25 +0000 (15:16 +0100)
src/librustc_mir/interpret/visitor.rs

index 930bcb44374aa21fc5b52c97e179cd5568aaa3de..4ff5cde08d08694cf1aa287e954a02d34dcd4944 100644 (file)
@@ -125,14 +125,14 @@ fn project_field(
 }
 
 macro_rules! make_value_visitor {
-    ($visitor_trait_name:ident, $($mutability:ident)*) => {
+    ($visitor_trait_name:ident, $($mutability:ident)?) => {
         // How to traverse a value and what to do when we are at the leaves.
         pub trait $visitor_trait_name<'a, 'mir, 'tcx: 'mir+'a, M: Machine<'a, 'mir, 'tcx>>: Sized {
             type V: Value<'a, 'mir, 'tcx, M>;
 
             /// The visitor must have an `EvalContext` in it.
-            fn ecx(&$($mutability)* self)
-                -> &$($mutability)* EvalContext<'a, 'mir, 'tcx, M>;
+            fn ecx(&$($mutability)? self)
+                -> &$($mutability)? EvalContext<'a, 'mir, 'tcx, M>;
 
             // Recursive actions, ready to be overloaded.
             /// Visit the given value, dispatching as appropriate to more specialized visitors.