Allow ExprLit expression macros to be used in patterns.
This commit is contained in:
parent
f297366593
commit
a9c3109a6a
3 changed files with 20 additions and 0 deletions
|
@ -43,4 +43,9 @@ pub fn main() {
|
|||
[1] == (42 as u8)); // '*'
|
||||
// The Windows tests are wrapped in an extra module for some reason
|
||||
assert!((m1::m2::where_am_i().as_slice().ends_with("m1::m2")));
|
||||
|
||||
assert!(match (47, "( 2 * 3 ) + 5") {
|
||||
(line!(), stringify!((2*3) + 5)) => true,
|
||||
_ => false
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue