mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +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,
|
_tt: &tt::Subtree,
|
||||||
) -> Result<tt::Subtree, mbe::ExpandError> {
|
) -> Result<tt::Subtree, mbe::ExpandError> {
|
||||||
// dummy implementation for type-checking purposes
|
// 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__" };
|
let expanded = quote! { "__RA_UNIMPLEMENTATED__" };
|
||||||
|
|
||||||
Ok(expanded)
|
Ok(expanded)
|
||||||
|
@ -394,7 +397,7 @@ mod tests {
|
||||||
"#,
|
"#,
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(expanded, "\"\"");
|
assert_eq!(expanded, "\"__RA_UNIMPLEMENTATED__\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue