From 1ea4810c84e0d496bf10ebccc7e2ae5de1fb3590 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Wed, 29 Dec 2021 16:36:08 +0100 Subject: [PATCH] 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. --- library/test/src/lib.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs index 17e15243afd..1e8c63b69db 100644 --- a/library/test/src/lib.rs +++ b/library/test/src/lib.rs @@ -13,11 +13,6 @@ // running tests while providing a base that other test frameworks may // build off of. -// N.B., this is also specified in this crate's Cargo.toml, but librustc_ast contains logic specific to -// this crate, which relies on this attribute (rather than the value of `--crate-name` passed by -// cargo) to detect this crate. - -#![crate_name = "test"] #![unstable(feature = "test", issue = "50297")] #![doc(test(attr(deny(warnings))))] #![feature(libc)]