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.
1 parent 3f5fc05 commit ad4b02eCopy full SHA for ad4b02e
crates/hir_def/src/macro_expansion_tests/mbe.rs
@@ -299,6 +299,34 @@ fn baz() {
299
)
300
}
301
302
+#[test]
303
+fn asi() {
304
+ // Thanks, Christopher!
305
+ //
306
+ // https://internals.rust-lang.org/t/understanding-decisions-behind-semicolons/15181/29
307
+ check(
308
+ r#"
309
+macro_rules! asi { ($($stmt:stmt)*) => ($($stmt)*); }
310
+
311
+fn main() {
312
+ asi! {
313
+ let a = 2
314
+ let b = 5
315
+ drop(b-a)
316
+ println!("{}", a+b)
317
+ }
318
+}
319
+"#,
320
+ expect![[r#"
321
322
323
324
+ let a = 2let b = 5drop(b-a)println!("{}", a+b)
325
326
+"#]],
327
+ )
328
329
330
#[test]
331
fn test_match_group_empty_fixed_token() {
332
check(
0 commit comments