Skip to content

Commit 1ea4810

Browse files
committed
Remove #![crate_name] attribute from libtest
The crate name is already set in Cargo.toml. The comment says there is some logic in the compiler that reads #![crate_name] and not --crate-name, but I can't find it. Removing it seems to work fine.
1 parent 75d8339 commit 1ea4810

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

library/test/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
// running tests while providing a base that other test frameworks may
1414
// build off of.
1515

16-
// N.B., this is also specified in this crate's Cargo.toml, but librustc_ast contains logic specific to
17-
// this crate, which relies on this attribute (rather than the value of `--crate-name` passed by
18-
// cargo) to detect this crate.
19-
20-
#![crate_name = "test"]
2116
#![unstable(feature = "test", issue = "50297")]
2217
#![doc(test(attr(deny(warnings))))]
2318
#![feature(libc)]

0 commit comments

Comments
 (0)