aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2020-03-07 05:02:54 +0000
committerEdwin Cheng <[email protected]>2020-03-07 05:02:54 +0000
commit2e178b5475b156e1876e4e6971c0abd3bdf6c889 (patch)
tree7b9a9b39256f829f7f2eb1961ed880833f0367d6 /crates
parent36c768468729653079ed5c00e759bd12cd02e241 (diff)
Fix test and add more comment
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_hir_expand/src/builtin_macro.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_hir_expand/src/builtin_macro.rs b/crates/ra_hir_expand/src/builtin_macro.rs
index 51d54331e..a57e9285f 100644
--- a/crates/ra_hir_expand/src/builtin_macro.rs
+++ b/crates/ra_hir_expand/src/builtin_macro.rs
@@ -142,6 +142,9 @@ fn env_expand(
142 _tt: &tt::Subtree, 142 _tt: &tt::Subtree,
143) -> Result<tt::Subtree, mbe::ExpandError> { 143) -> Result<tt::Subtree, mbe::ExpandError> {
144 // dummy implementation for type-checking purposes 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
145 let expanded = quote! { "__RA_UNIMPLEMENTATED__" }; 148 let expanded = quote! { "__RA_UNIMPLEMENTATED__" };
146 149
147 Ok(expanded) 150 Ok(expanded)
@@ -394,7 +397,7 @@ mod tests {
394 "#, 397 "#,
395 ); 398 );
396 399
397 assert_eq!(expanded, "\"\""); 400 assert_eq!(expanded, "\"__RA_UNIMPLEMENTATED__\"");
398 } 401 }
399 402
400 #[test] 403 #[test]