Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 4 tasks
rustbot opened this issue Aug 27, 2024 · 3 comments
Open
2 of 4 tasks
Labels
relnotes Marks issues that should be documented in the release notes of the next release. relnotes-tracking-issue Marks issues tracking what text to put in release notes. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone

Comments

@rustbot
Copy link
Collaborator

rustbot commented Aug 27, 2024

This issue tracks the release notes text for #129670.

  • Issue is nominated for the responsible team (and T-release nomination is removed).
  • Proposed text is drafted by team responsible for underlying change.
  • Issue is nominated for release team review of clarity for wider audience.
  • Release team includes text in release notes/blog posts.

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):

@rustbot rustbot added I-release-nominated Nominated for the release team. relnotes Marks issues that should be documented in the release notes of the next release. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 27, 2024
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 29, 2024
@Mark-Simulacrum Mark-Simulacrum added the relnotes-tracking-issue Marks issues tracking what text to put in release notes. label Sep 6, 2024
@Urgau
Copy link
Member

Urgau commented Oct 6, 2024

@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. 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 = "...")].

@rustbot rustbot added this to the 1.83.0 milestone Oct 6, 2024
@Urgau Urgau added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. and removed I-release-nominated Nominated for the release team. labels Oct 7, 2024
@est31
Copy link
Member

est31 commented Oct 8, 2024

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
Copy link
Member

Urgau commented Oct 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. relnotes-tracking-issue Marks issues tracking what text to put in release notes. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants