rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.91k stars 12.67k forks source link

Tracking issue for release notes of #129670: Make deprecated_cfg_attr_crate_type_name a hard error #129671

Open rustbot opened 1 month ago

rustbot commented 1 month ago

This issue tracks the release notes text for #129670.

Release notes text:

The section title will be de-duplicated by the release team with other release notes issues. Prefer to use the standard titles from previous releases. More than one section can be included if needed.

# Compatibility Notes
- The future incompatibility lint `deprecated_cfg_attr_crate_type_name` [has been made into a hard error](https://github.com/rust-lang/rust/pull/129670). It was used to deny usage of `#![crate_type]` and `#![crate_name]` attributes in `#![cfg_attr]`, which required a hack in the compiler to be able to change the used crate type and crate name after cfg expansion.

  Users can use `--crate-type` instead of `#![cfg_attr(..., crate_type = "...")]` and `--crate-name` instead of `#![cfg_attr(..., crate_name = "...")]` when running `rustc`/`cargo rustc` on the command line.

  Use of those two attributes outside of `#![cfg_attr]` continue to be fully supported.

Release blog section (if any, leave blank if no section is expected):

Urgau commented 2 weeks ago

@est31 What do you think about this compatibility notes?

# Compatibility Notes

- The future incompatibility lint `deprecated_cfg_attr_crate_type_name` [has been made into a hard error](https://github.com/rust-lang/rust/pull/129670). It was used to deny usage of `#![crate_type]` and `#![crate_name]` attributes in `#![cfg_attr]`, which required a hack in the compiler to be able to change the used crate type and crate name after macros have been expanded.

  Users must now use `--crate-type` on the command line when running `rustc` instead of `#![cfg_attr(..., crate_type = "...")]` and `--crate-name` instead of `#![cfg_attr(..., crate_name = "...")]`.
# Compatibility Notes - The future incompatibility lint `deprecated_cfg_attr_crate_type_name` [has been made into a hard error](https://github.com/rust-lang/rust/pull/129670). It was used to deny usage of `#![crate_type]` and `#![crate_name]` attributes in `#![cfg_attr]`, which required a hack in the compiler to be able to change the used crate type and crate name after macros have been expanded. Users must now use `--crate-type` on the command line when running `rustc` instead of `#![cfg_attr(..., crate_type = "...")]` and `--crate-name` instead of `#![cfg_attr(..., crate_name = "...")]`.
est31 commented 2 weeks ago

I would write "Users can instead use" instead of "Users must now use" -- it's still entirely up to users what to do. They can also make separate crates where they include!() lib.rs.

"after macros have been expanded." after cfg expansion. Maybe also add "Use of the attributes outside of #![cfg_attr] is still supported.".

Urgau commented 2 weeks ago

Sure, updated with your suggestions and tweaked a bit the sentences.