aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-04-08 11:51:46 +0100
committerGitHub <[email protected]>2020-04-08 11:51:46 +0100
commit9aa3bca53626a76657ecf5f59c431dcd3f7a8085 (patch)
tree85b7729d3c8edbae11faad34f3d4a0d41749de18 /crates/ra_mbe
parent9e3c8438475308bffaced3d9842299676037d036 (diff)
parent53d05448c1d44b3ac2a46d54b40c3f2653fa0312 (diff)
Merge #3892
3892: Add L_DOLLAR for TYPE_RECOVERY_SET r=matklad a=edwin0cheng This PR is a hot fix for issue #3861 that just prevent it make the parser being stuck. The actual problem described in https://github.com/rust-analyzer/rust-analyzer/pull/3873#issuecomment-610208693 is a very deep rabbit hole I don't want to dig right now :( Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_mbe')
-rw-r--r--crates/ra_mbe/src/tests.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs
index a7fcea0ac..254318e23 100644
--- a/crates/ra_mbe/src/tests.rs
+++ b/crates/ra_mbe/src/tests.rs
@@ -1615,6 +1615,23 @@ fn test_issue_2520() {
1615} 1615}
1616 1616
1617#[test] 1617#[test]
1618fn test_issue_3861() {
1619 let macro_fixture = parse_macro(
1620 r#"
1621 macro_rules! rgb_color {
1622 ($p:expr, $t: ty) => {
1623 pub fn new() {
1624 let _ = 0 as $t << $p;
1625 }
1626 };
1627 }
1628 "#,
1629 );
1630
1631 macro_fixture.expand_items(r#"rgb_color!(8 + 8, u32);"#);
1632}
1633
1634#[test]
1618fn test_repeat_bad_var() { 1635fn test_repeat_bad_var() {
1619 // FIXME: the second rule of the macro should be removed and an error about 1636 // FIXME: the second rule of the macro should be removed and an error about
1620 // `$( $c )+` raised 1637 // `$( $c )+` raised