1
Fork 0

Add a test with an empty crate name.

This error was untested.
This commit is contained in:
Nicholas Nethercote 2025-03-25 10:51:42 +11:00
parent aa8f0fd716
commit 1a6266340e
2 changed files with 13 additions and 0 deletions

View file

@ -0,0 +1,5 @@
// Ensure we reject `#![crate_name = ""]`.
#![crate_name = ""] //~ ERROR crate name must not be empty
fn main() {}

View file

@ -0,0 +1,8 @@
error: crate name must not be empty
--> $DIR/crate-name-empty.rs:3:1
|
LL | #![crate_name = ""]
| ^^^^^^^^^^^^^^^^^^^
error: aborting due to 1 previous error