Skip to content

Commit 8db956b

Browse files
committed
Move multi-file test to use auxiliary/ directory layout
Place submod.rs under tests/ui/attributes/auxiliary/ and use #[path] to include it, matching the preferred compiletest test structure. Removes the need for //@ ignore-auxiliary.
1 parent 59debaf commit 8db956b

4 files changed

Lines changed: 3 additions & 3 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#![crate_name = "bar"]

tests/ui/attributes/crate-root-path-in-different-file/crate-root-path-in-different-file.rs renamed to tests/ui/attributes/crate-root-path-in-different-file.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![deny(unused_attributes)]
22

3+
#[path = "auxiliary/submod.rs"]
34
mod submod;
45

56
fn main() {}

tests/ui/attributes/crate-root-path-in-different-file/crate-root-path-in-different-file.stderr renamed to tests/ui/attributes/crate-root-path-in-different-file.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: the `#![crate_name]` attribute can only be used at the crate root
2-
--> $DIR/submod.rs:2:1
2+
--> $DIR/auxiliary/submod.rs:1:1
33
|
44
LL | #![crate_name = "bar"]
55
| ^^^^^^^^^^^^^^^^^^^^^^

tests/ui/attributes/crate-root-path-in-different-file/submod.rs

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)