mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
Add a test for #2214
This commit is contained in:
parent
b8106eb2aa
commit
5aaa00a929
@ -204,3 +204,15 @@ macro_rules! try_opt {
|
|||||||
None => { return None; }
|
None => { return None; }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #2214
|
||||||
|
// macro call whose argument is an array with trailing comma.
|
||||||
|
fn issue2214() {
|
||||||
|
make_test!(str_searcher_ascii_haystack, "bb", "abbcbbd", [
|
||||||
|
Reject(0, 1),
|
||||||
|
Match (1, 3),
|
||||||
|
Reject(3, 4),
|
||||||
|
Match (4, 6),
|
||||||
|
Reject(6, 7),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
@ -253,3 +253,20 @@ macro_rules! try_opt {
|
|||||||
None => { return None; }
|
None => { return None; }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #2214
|
||||||
|
// macro call whose argument is an array with trailing comma.
|
||||||
|
fn issue2214() {
|
||||||
|
make_test!(
|
||||||
|
str_searcher_ascii_haystack,
|
||||||
|
"bb",
|
||||||
|
"abbcbbd",
|
||||||
|
[
|
||||||
|
Reject(0, 1),
|
||||||
|
Match(1, 3),
|
||||||
|
Reject(3, 4),
|
||||||
|
Match(4, 6),
|
||||||
|
Reject(6, 7),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user