-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 Rust 2024: Reserve gen
keyword
#123904
Comments
nope, just syntax is fine, all that is needed to fix this issue is writing documentation |
Minor bug in the lint: #124862 |
what will it take to support this in rust-analyzer? |
Following RFC 3513 and subsequent work, the `gen` keyword is reserved in the Rust 2024 edition. Let's document that. See tracking issue: - rust-lang/rust#123904
Results from the crater run showed a few limitations of the migration lint, which I don't think there is much we can do about. The following is a summary: attribute macro issues: use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("it is {gen}")]
A{gen: i32}
}
proc-macro got confused via quote!: let gen = 123;
quote!(let a = #gen);
Pulled via |
We reviewed this in the edition call today. This item is ready for Rust 2024. It's implemented; the automatic migration lints have landed; we've tested those with crater, and the item is documented in the reference and in the edition guide. Thanks to @oli-obk and to @compiler-errors for pushing this forward, and thanks to @ehuss for writing up the content for the edition guide and for running crater and analyzing its results. |
Following RFC 3513 and subsequent work, the `gen` keyword is reserved in the Rust 2024 edition. Let's document that. See tracking issue: - rust-lang/rust#123904
This is a tracking issue for reserving the
gen
keyword in Rust 2024 according to:gen
blocks and reserve keyword in Rust 2024 rfcs#3513The feature gate for the issue is
#![feature(gen_blocks)]
.About tracking issues
Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
gen
keyword in nightly Rust 2024.gen
blocks in the 2024 edition #116447edition_2024_compat
lints #123680gen
keyword as reserved in Rust 2024 reference#1501gen
keyword edition-guide#300Unresolved Questions
gen
.gen
as a full keyword or as a contextual one.Related
gen
blocks and functions #117078'r#ident
) #126452Implementation history
gen
blocks in the 2024 edition #116447keyword_idents_2024
#124862cc @oli-obk @compiler-errors
The text was updated successfully, but these errors were encountered: