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 36c7684 commit 2e178b5Copy full SHA for 2e178b5
crates/ra_hir_expand/src/builtin_macro.rs
@@ -142,6 +142,9 @@ fn env_expand(
142
_tt: &tt::Subtree,
143
) -> Result<tt::Subtree, mbe::ExpandError> {
144
// dummy implementation for type-checking purposes
145
+ // we cannot use an empty string here, because for
146
+ // `include!(concat!(env!("OUT_DIR"), "/foo.rs"))` will become
147
+ // `include!("foo.rs"), which maybe infinite loop
148
let expanded = quote! { "__RA_UNIMPLEMENTATED__" };
149
150
Ok(expanded)
@@ -394,7 +397,7 @@ mod tests {
394
397
"#,
395
398
);
396
399
- assert_eq!(expanded, "\"\"");
400
+ assert_eq!(expanded, "\"__RA_UNIMPLEMENTATED__\"");
401
}
402
403
#[test]
0 commit comments