Closed
Description
Given the following code: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=cfb35aa70ccef56dfbb931a7c093d42b
The current output is:
warning: unused attribute
--> ./temp.rs:2:1
|
2 | #![crate_type = "lib"]
| ^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
|
= note: `#[warn(unused_attributes)]` on by default
note: attribute also specified here
--> ./temp.rs:1:1
|
1 | #![crate_type = "dylib"]
| ^^^^^^^^^^^^^^^^^^^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
Ideally there should be no output. When using command line arguments instead of the crate_type attributes, there is no output.
Note that the compilation process is successful: even with the warning, both an dylib and a rlib is produced.
May be related to #92933.
Tested with rustc 1.60.0 (7737e0b 2022-04-04).