Add a test with an empty crate name.
This error was untested.
This commit is contained in:
parent
aa8f0fd716
commit
1a6266340e
2 changed files with 13 additions and 0 deletions
5
tests/ui/attributes/crate-name-empty.rs
Normal file
5
tests/ui/attributes/crate-name-empty.rs
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Ensure we reject `#![crate_name = ""]`.
|
||||
|
||||
#![crate_name = ""] //~ ERROR crate name must not be empty
|
||||
|
||||
fn main() {}
|
8
tests/ui/attributes/crate-name-empty.stderr
Normal file
8
tests/ui/attributes/crate-name-empty.stderr
Normal 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
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue