7265: Add a test for #7110 r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2021-01-14 11:41:29 +00:00 committed by GitHub
commit 947850c2d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -516,6 +516,37 @@ mod prelude { struct Option; }
);
}
#[test]
fn completes_prelude_macros() {
check(
r#"
//- /main.rs crate:main deps:std
fn f() {$0}
//- /std/lib.rs crate:std
#[prelude_import]
pub use prelude::*;
#[macro_use]
mod prelude {
pub use crate::concat;
}
mod macros {
#[rustc_builtin_macro]
#[macro_export]
macro_rules! concat { }
}
"#,
expect![[r##"
fn f() fn f()
ma concat!() #[macro_export]
macro_rules! concat
md std
"##]],
);
}
#[test]
fn completes_std_prelude_if_core_is_defined() {
check(