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

CURRENT_RUSTC_VERSION does not work with #[deprecated] #126323

Open
RalfJung opened this issue Jun 12, 2024 · 4 comments
Open

CURRENT_RUSTC_VERSION does not work with #[deprecated] #126323

RalfJung opened this issue Jun 12, 2024 · 4 comments
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) requires-internal-features This issue requires the use of internal features. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Comments

@RalfJung
Copy link
Member

Found by @m-ou-se here:

   Compiling libc v0.2.155
   Compiling memchr v2.5.0
   Compiling std v0.0.0 (/checkout/library/std)
   Compiling compiler_builtins v0.1.109
error: 'since' must be a Rust version number, such as "1.31.0"
   |
   |
82 |     #[deprecated(since = "CURRENT_RUSTC_VERSION", note = "this never returns anything useful")]

error: could not compile `core` (lib) due to 1 previous error
Build completed unsuccessfully in 0:00:26
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 12, 2024
@RalfJung
Copy link
Member Author

Cc @est31 I think?

@est31
Copy link
Member

est31 commented Jun 12, 2024

The CURRENT_RUSTC_VERSION replacement script works great, it's just a textual find an replace. But I suppose whatever parses deprecated needs to be taught about CURRENT_RUSTC_VERSION, and we'll probably need a way to restrict usage to inside rustc only, maybe via a feature or something.

@tbu-

This comment was marked as resolved.

@RalfJung RalfJung changed the title CURRENT_RUSTC_VERSION does not work with '[deprecated] CURRENT_RUSTC_VERSION does not work with #[deprecated] Jun 12, 2024
@veera-sivarajan
Copy link
Contributor

@rustbot label -needs-triage +A-attributes +T-libs +requires-internal-features

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) requires-internal-features This issue requires the use of internal features. T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) requires-internal-features This issue requires the use of internal features. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants