mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 21:54:42 +00:00
Fix test and add more comment
This commit is contained in:
parent
36c7684687
commit
2e178b5475
1 changed files with 4 additions and 1 deletions
|
@ -142,6 +142,9 @@ fn env_expand(
|
|||
_tt: &tt::Subtree,
|
||||
) -> Result<tt::Subtree, mbe::ExpandError> {
|
||||
// dummy implementation for type-checking purposes
|
||||
// we cannot use an empty string here, because for
|
||||
// `include!(concat!(env!("OUT_DIR"), "/foo.rs"))` will become
|
||||
// `include!("foo.rs"), which maybe infinite loop
|
||||
let expanded = quote! { "__RA_UNIMPLEMENTATED__" };
|
||||
|
||||
Ok(expanded)
|
||||
|
@ -394,7 +397,7 @@ mod tests {
|
|||
"#,
|
||||
);
|
||||
|
||||
assert_eq!(expanded, "\"\"");
|
||||
assert_eq!(expanded, "\"__RA_UNIMPLEMENTATED__\"");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue