-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
(Spawned off of issue #43106)
Compiling this code (in stable/beta/nightly) results in the following compiler warnings:
#![crate_id = "x"]
fn main() { }
warnings:
warning: unused attribute
--> <anon>:1:1
|
1 | #![crate_id = "x"]
| ^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_attributes)] on by default
warning: crate-level attribute should be in the root module
--> <anon>:1:1
|
1 | #![crate_id = "x"]
| ^^^^^^^^^^^^^^^^^^
The first warning is legitimate, since we killed off #![crate_id]
back in RFC 109. The fact that it exists as an attribute in the code base is probably for backwards compatibility.
- (The fact that it still has occurrences in the
run-pass
test suite is less explicable, since it should have no effect in the currentrustc
...)
The second warning is quite confusing, since the attribute is in the root module.
Can we easily kill off the second warning in this case?
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.