Revert "feat: Implement module_path macro"

This commit is contained in:
Lukas Wirth 2024-08-27 08:19:09 +02:00 committed by GitHub
parent 095926ea6f
commit fa48bc216c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 71 additions and 278 deletions

View file

@ -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"
```
"#]],
);
}