Closed
Description
(Spawned off of issue #43106)
Compiling this code (in stable/beta/nightly) results in the following compiler warnings:
#![no_start]
fn main() { }
warnings:
warning: unused attribute
--> <anon>:1:1
|
1 | #![no_start]
| ^^^^^^^^^^^^
|
= note: #[warn(unused_attributes)] on by default
warning: crate-level attribute should be in the root module
--> <anon>:1:1
|
1 | #![no_start]
| ^^^^^^^^^^^^
|
= note: #[warn(unused_attributes)] on by default
Similarly to #43142, the warning that a crate-level attribute should be in the root module is false here: This attribute is in the root module.
(I suspect that #[no_start]
, like #[crate_id="..."]
, is simply totally unused at this point, and our infrastructure for warning about crate-level attributes in the wrong place in the AST is somehow mistakenly coupled to the unused_attribute
analysis.)