mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Revert "feat: Implement module_path
macro"
This commit is contained in:
parent
095926ea6f
commit
fa48bc216c
20 changed files with 71 additions and 278 deletions
|
@ -8702,68 +8702,3 @@ fn foo() {
|
|||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn module_path_macro() {
|
||||
check(
|
||||
r##"
|
||||
//- minicore: module_path
|
||||
|
||||
const C$0: &'static str = module_path!();
|
||||
"##,
|
||||
expect![[r#"
|
||||
*C*
|
||||
|
||||
```rust
|
||||
test
|
||||
```
|
||||
|
||||
```rust
|
||||
const C: &'static str = "test"
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
check(
|
||||
r##"
|
||||
//- minicore: module_path
|
||||
|
||||
mod foo {
|
||||
const C$0: &'static str = module_path!();
|
||||
}
|
||||
"##,
|
||||
expect![[r#"
|
||||
*C*
|
||||
|
||||
```rust
|
||||
test::foo
|
||||
```
|
||||
|
||||
```rust
|
||||
const C: &'static str = "test::foo"
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
check(
|
||||
r##"
|
||||
//- minicore: module_path
|
||||
mod baz {
|
||||
const _: () = {
|
||||
mod bar {
|
||||
const C$0: &'static str = module_path!();
|
||||
}
|
||||
}
|
||||
}
|
||||
"##,
|
||||
expect![[r#"
|
||||
*C*
|
||||
|
||||
```rust
|
||||
test::bar
|
||||
```
|
||||
|
||||
```rust
|
||||
const C: &'static str = "test::baz::bar"
|
||||
```
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue