We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9b16ae5 + ce674be commit b949500Copy full SHA for b949500
crates/ra_mbe/src/tests.rs
@@ -214,6 +214,33 @@ SUBTREE $
214
);
215
}
216
217
+#[test]
218
+fn test_lifetime_split() {
219
+ parse_macro(
220
+ r#"
221
+macro_rules! foo {
222
+ ($($t:tt)*) => { $($t)*}
223
+}
224
+"#,
225
+ )
226
+ .assert_expand(
227
+ r#"foo!(static bar: &'static str = "hello";);"#,
228
229
+SUBTREE $
230
+ IDENT static 17
231
+ IDENT bar 18
232
+ PUNCH : [alone] 19
233
+ PUNCH & [alone] 20
234
+ PUNCH ' [joint] 21
235
+ IDENT static 22
236
+ IDENT str 23
237
+ PUNCH = [alone] 24
238
+ LITERAL "hello" 25
239
+ PUNCH ; [joint] 26
240
241
+ );
242
243
+
244
#[test]
245
fn test_expr_order() {
246
let expanded = parse_macro(
0 commit comments