Fix test and add more comment

This commit is contained in:
Edwin Cheng 2020-03-07 13:02:54 +08:00
parent 36c7684687
commit 2e178b5475

View file

@ -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]