mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add a test for #7110
This commit is contained in:
parent
d76143da19
commit
dd5b3cd6f0
1 changed files with 31 additions and 0 deletions
|
@ -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]
|
#[test]
|
||||||
fn completes_std_prelude_if_core_is_defined() {
|
fn completes_std_prelude_if_core_is_defined() {
|
||||||
check(
|
check(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue