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 ebf8b1a commit e34ae76Copy full SHA for e34ae76
crates/ide/src/expand_macro.rs
@@ -237,6 +237,24 @@ fn main() {
237
);
238
}
239
240
+ #[test]
241
+ fn macro_expand_underscore() {
242
+ check(
243
+ r#"
244
+macro_rules! bar {
245
+ ($i:tt) => { for _ in 0..$i {} }
246
+}
247
+fn main() {
248
+ ba$0r!(42);
249
250
+"#,
251
+ expect![[r#"
252
+ bar
253
+ for _ in 0..42{}
254
+ "#]],
255
+ );
256
+ }
257
+
258
#[test]
259
fn macro_expand_recursive_expansion() {
260
check(
0 commit comments