anchor.diff:  
   %% Helpers
   
  -build_rescue(Meta, Parts, Body, S) ->
  -  Matches = [Match || {Match, _} <- Parts],
  -
  -  {{clause, Line, TMatches, _, TBody}, TS} =
  -    elixir_erl_clauses:clause(Meta, fun elixir_erl_pass:translate_args/2, Matches, Body, [], S),
  -
  -  TClauses =
  -    [begin
  -       TGuards = elixir_erl_clauses:guards(Guards, [], TS),
  -       build_clause(Line, {atom, Line, error}, TMatch, TGuards, TBody, TS)
  -     end || {TMatch, {_, Guards}} <- lists:zip(TMatches, Parts)],
  -
  -  {TClauses, TS}.
  +build_rescue(Meta, Var, Guards, Body, S) ->
  +  {{clause, Line, [TMatch], TGuards, TBody}, TS} =
  +    elixir_erl_clauses:clause(Meta, fun elixir_erl_pass:translate_args/2, [Var], Body, Guards, S),
  +
  +  build_clause(Line, {atom, Line, error}, TMatch, TGuards, TBody, TS).
   
   %% Convert rescue clauses ("var in [alias1, alias2]") into guards.
  -rescue_guards(_Meta, _Var, [], S) ->
  -  {[], [], S};
  -rescue_guards(Meta, Var, Aliases, S) ->
  -  %% TODO: We emit two clauses here because we cannot access map fields
  -  %% before Erlang/OTP 21. So in the future we can compile this code in a
  -  %% way to emit a single clause for both Erlang and Elixir and also
  -  %% simplify build_rescue.
  -  {ErlangGuards, ErlangAliases} = rescue_each_ref(Meta, Var, Aliases, [], [], S),
  -
  -  %% Compute the optional Erlang check
  -  ErlangParts =
  -    case ErlangGuards of
  -      [] -> [];
  -      _  -> [{Var, ErlangGuards}]
  -    end,
  -
  -  %% Compute the always present Elixir check
  -  {VarName, _, CS} = elixir_erl_var:build('_', S),
  -  StructVar = {VarName, Meta, 'Elixir'},
  -  Map = {'%{}', Meta, [{'__struct__', StructVar}, {'__exception__', true}]},
  -  Match = {'=', Meta, [Map, Var]},
  -  ElixirGuards = [{erl(Meta, '=='), Meta, [StructVar, Alias]} || Alias <- Aliases],
  -  {[{Match, ElixirGuards} | ErlangParts], ErlangAliases, CS}.
  -
  -build_clause(Line, Kind, Expr, Guards, Body, #elixir_erl{stacktrace=Var}) ->
  +rescue_guards(_Meta, _Var, []) ->
  +  {[], []};
  +rescue_guards(Meta, Var, Aliases) ->
  +  {ErlangGuards, ErlangAliases} = erl_rescue(Meta, Var, Aliases, [], []),
  +
  +  ElixirGuards =
  +    [erl_and(Meta,
  +       {erl(Meta, '=='), Meta, [{erl(Meta, map_get), Meta, ['__struct__', Var]}, Alias]},
  +       {erl(Meta, map_get), Meta, ['__exception__', Var]}
  +     ) || Alias <- Aliases],
  +
  +  {ElixirGuards ++ ErlangGuards, ErlangAliases}.
  +
  +build_clause(Line, Kind, Expr, Guards, Body, #elixir_erl{stacktrace=Var} = TS) ->
     Match = {tuple, Line, [Kind, Expr, {var, Line, Var}]},
  -  {clause, Line, [Match], Guards, Body}.
  +  {{clause, Line, [Match], Guards, Body}, TS}.
   
   %% Rescue each atom name considering their Erlang or Elixir matches.
   %% Matching of variables is done with Erlang exceptions is done in
   %% function for optimization.
   
  -rescue_each_ref(Meta, Var, [H | T], Guards, Aliases, S) when is_atom(H) ->
  +erl_rescue(Meta, Var, [H | T], Guards, Aliases) when is_atom(H) ->
     case erl_rescue_guard_for(Meta, Var, H) of
  -    false -> rescue_each_ref(Meta, Var, T, Guards, Aliases, S);
  -    Expr  -> rescue_each_ref(Meta, Var, T, [Expr | Guards], [H | Aliases], S)
  +    false -> erl_rescue(Meta, Var, T, Guards, Aliases);
  +    Expr  -> erl_rescue(Meta, Var, T, [Expr | Guards], [H | Aliases])
     end;
  -rescue_each_ref(_, _, [], Guards, Aliases, _) ->
  +erl_rescue(_, _, [], Guards, Aliases) ->
     {Guards, Aliases}.
   
   %% Handle Erlang rescue matches.
  
positive.code:   {{clause, Line, [TKind, TMatches], TGuards, TBody}, TS} =
      elixir_erl_clauses:clause(Meta, fun elixir_erl_pass:translate_args/2, Match, Expr, Guards, S),
  
    {[build_clause(Line, TKind, TMatches, TGuards, TBody, TS)], TS};
  
  each_clause({rescue, Meta, [{in, _, [Left, Right]}], Expr}, S) ->
    {TempName, _, CS} = elixir_erl_var:build('_', S),
    TempVar = {TempName, Meta, ?var_context},
    {Parts, ErlangAliases, FS} = rescue_guards(Meta, TempVar, Right, CS),
    Body = normalize_rescue(Meta, TempVar, Left, Expr, ErlangAliases),
    build_rescue(Meta, Parts, Body, FS);
  
  each_clause({rescue, Meta, [{VarName, _, Context} = Left], Expr}, S) when is_atom(VarName), is_atom(Context) ->
    {TempName, _, CS} = elixir_erl_var:build('_', S),
    TempVar = {TempName, Meta, ?var_context},
    Body = normalize_rescue(Meta, TempVar, Left, Expr, ['Elixir.ErlangError']),
    build_rescue(Meta, [{TempVar, []}], Body, CS).
  
  normalize_rescue(_Meta, _Var, {'_', _, Atom}, Expr, _) when is_atom(Atom) ->
    Expr;
  
negative.code: 
  reduce_clauses([H | T], Acc, OldStack, SAcc, S) ->
    {TH, TS} = each_clause(H, SAcc),
    reduce_clauses(T, [TH | Acc], OldStack, elixir_erl_var:discard_vars(TS, S), S);
  reduce_clauses([], Acc, OldStack, SAcc, _S) ->
    {lists:reverse(Acc), SAcc#elixir_erl{stacktrace=OldStack}}.
  
  