diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-27 16:42:01 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-27 16:42:01 +0000 |
commit | 1d530756ed7ba175ec32ff71247072798dc9a748 (patch) | |
tree | 963fdccf1eb28ecc23031f3e7ec12cfb7510e723 /crates/mbe/src/tests.rs | |
parent | 8f2622199e86ea0d4c8accf72c364ac8eddbf545 (diff) | |
parent | 26e1f7696ae3903f868e50409fb7ee70ee37d6db (diff) |
Merge #7050
7050: Ignore third punct when matching for 2-composite punct in mbe r=jonas-schievink a=edwin0cheng
Fixes #6692
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/mbe/src/tests.rs')
-rw-r--r-- | crates/mbe/src/tests.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/mbe/src/tests.rs b/crates/mbe/src/tests.rs index 451fa1456..6cd0ed205 100644 --- a/crates/mbe/src/tests.rs +++ b/crates/mbe/src/tests.rs | |||
@@ -992,6 +992,22 @@ fn test_tt_composite2() { | |||
992 | } | 992 | } |
993 | 993 | ||
994 | #[test] | 994 | #[test] |
995 | fn test_tt_with_composite_without_space() { | ||
996 | parse_macro( | ||
997 | r#" | ||
998 | macro_rules! foo { | ||
999 | ($ op:tt, $j:path) => ( | ||
1000 | 0 | ||
1001 | ) | ||
1002 | } | ||
1003 | "#, | ||
1004 | ) | ||
1005 | // Test macro input without any spaces | ||
1006 | // See https://github.com/rust-analyzer/rust-analyzer/issues/6692 | ||
1007 | .assert_expand_items("foo!(==,Foo::Bool)", "0"); | ||
1008 | } | ||
1009 | |||
1010 | #[test] | ||
995 | fn test_underscore() { | 1011 | fn test_underscore() { |
996 | parse_macro( | 1012 | parse_macro( |
997 | r#" | 1013 | r#" |