-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I have this library crate:
#![type_length_limit = "95595489"]
pub fn main() {
println!("Hello, world!");
}
When I build it with 1.55.0-nightly (27277d966 2021-07-16)
I get no warnings.
When I try to perform edition migrations with it by running cargo +nightly fix --edition
, I get warnings:
Migrating src/lib.rs from 2018 edition to 2021
warning: unused attribute
--> src/lib.rs:1:1
|
1 | #![type_length_limit = "95595489"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_attributes)]` on by default
warning: crate-level attribute should be in the root module
--> src/lib.rs:1:1
|
1 | #![type_length_limit = "95595489"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: 2 warnings emitted
As far as I know, this attribute is valid and has effect where it currently is, and either the 2021 edition migration is slightly broken, the 2021 edition has changed the behaviour of this attribute in a way I haven't seen documented.
rustc --version --verbose
:
rustc 1.55.0-nightly (b41936b92 2021-07-20)
binary: rustc
commit-hash: b41936b92cd8463020207cb2f62a4247942ef2e4
commit-date: 2021-07-20
host: x86_64-apple-darwin
release: 1.55.0-nightly
LLVM version: 12.0.1
Metadata
Metadata
Assignees
Labels
A-incr-compArea: Incremental compilationArea: Incremental compilationC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.