Skip to content

Commit

Permalink
Rollup merge of rust-lang#58352 - RalfJung:macro, r=oli-obk
Browse files Browse the repository at this point in the history
miri value visitor: use `?` in macro
  • Loading branch information
GuillaumeGomez authored Feb 10, 2019
2 parents 585f9a7 + eaf81c2 commit d792cef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc_mir/interpret/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Value<'a, 'mir, 'tcx, M>
}

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.
Expand Down

0 comments on commit d792cef

Please sign in to comment.