@@ -13,36 +13,6 @@ use crate::*;
13
13
use super :: backtrace:: EvalContextExt as _;
14
14
use helpers:: { check_abi, check_arg_count} ;
15
15
16
- /// This macro behaves just like `match $link_name { ... }`, but inserts a
17
- /// `$crate::helpers::check_abi($abi, $exp_abi)?` call at each match arm
18
- /// except the wildcard one.
19
- #[ macro_export]
20
- macro_rules! match_with_abi_check {
21
- ( $link_name: expr, $abi: expr, $exp_abi: expr, {
22
- $( |) ? $( $pattern: pat) |+ $( if $guard: expr) ? => $shim_impl: block
23
- $( $remaining: tt) +
24
- } ) => {
25
- match ( $link_name, $abi, $exp_abi) {
26
- ( $( $pattern) |+, abi, exp_abi) $( if $guard) ? => {
27
- $crate:: helpers:: check_abi( abi, exp_abi) ?;
28
- $shim_impl
29
- }
30
- ( link_name, abi, exp_abi) => match_with_abi_check!(
31
- link_name,
32
- abi,
33
- exp_abi,
34
- { $( $remaining) * }
35
- ) ,
36
- }
37
- } ;
38
- ( $link_name: ident, $abi: ident, $exp_abi: ident, {
39
- _ => $fallback: expr $( , ) ?
40
- } ) => ( {
41
- let _ = ( $link_name, $abi, $exp_abi) ;
42
- $fallback
43
- } ) ;
44
- }
45
-
46
16
impl < ' mir , ' tcx : ' mir > EvalContextExt < ' mir , ' tcx > for crate :: MiriEvalContext < ' mir , ' tcx > { }
47
17
pub trait EvalContextExt < ' mir , ' tcx : ' mir > : crate :: MiriEvalContextExt < ' mir , ' tcx > {
48
18
/// Returns the minimum alignment for the target architecture for allocations of the given size.
0 commit comments