Skip to content

generalize "async-idents" edition compatibility lint to other 2018 keywords #53077

New issue

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

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

Already on GitHub? # to your account

Closed
zackmdavis opened this issue Aug 5, 2018 · 1 comment
Closed
Assignees
Labels
A-edition-2018 Area: The 2018 edition A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. F-rust_2018_preview `#![feature(rust_2018_preview)]`
Milestone

Comments

@zackmdavis
Copy link
Member

The Edition Guide claims that await and try will be keywords in Edition 2018. On Discord, @scottmcm pointed out that one compatibility lint could check for all the new keywords. Right now we have async_idents to check for async, but it makes sense to just have one lint (rust_2018_keyword_idents?) instead of three, because there's not going to a situation where you would want, e.g., #[warn(async_idents)] but #[allow(try_idents)].

async_idents is already on the beta train, so if we do this, then we need to either:

  • (preferred) do it before the mid-September 1.29 cutoff and backport it to 1.29 beta, or
  • register_renamed for async_idents
@alexcrichton
Copy link
Member

I believe this should be fixed by #53685

alexcrichton added a commit to alexcrichton/rust that referenced this issue Aug 27, 2018
This commit generalizes the existing `async_idents` lint to easily encompass
other identifiers that will be keywords in future editions. The new lint is
called `keyword_idents` and the old `async_idents` lint is registered as renamed
to this new lint.

As a proof of concept the `try` keyword was added to this list as it looks to be
listed as a keyword in the 2018 edition only. The `await` keyword was not added
as it's not listed as a keyword yet.

Closes rust-lang#53077
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Aug 28, 2018
Generalize `async_idents` to all new keywords

This commit generalizes the existing `async_idents` lint to easily encompass
other identifiers that will be keywords in future editions. The new lint is
called `keyword_idents` and the old `async_idents` lint is registered as renamed
to this new lint.

As a proof of concept the `try` keyword was added to this list as it looks to be
listed as a keyword in the 2018 edition only. The `await` keyword was not added
as it's not listed as a keyword yet.

Closes rust-lang#53077
alexcrichton added a commit to alexcrichton/rust that referenced this issue Aug 29, 2018
This commit generalizes the existing `async_idents` lint to easily encompass
other identifiers that will be keywords in future editions. The new lint is
called `keyword_idents` and the old `async_idents` lint is registered as renamed
to this new lint.

As a proof of concept the `try` keyword was added to this list as it looks to be
listed as a keyword in the 2018 edition only. The `await` keyword was not added
as it's not listed as a keyword yet.

Closes rust-lang#53077
pietroalbini added a commit to pietroalbini/rust that referenced this issue Aug 29, 2018
Generalize `async_idents` to all new keywords

This commit generalizes the existing `async_idents` lint to easily encompass
other identifiers that will be keywords in future editions. The new lint is
called `keyword_idents` and the old `async_idents` lint is registered as renamed
to this new lint.

As a proof of concept the `try` keyword was added to this list as it looks to be
listed as a keyword in the 2018 edition only. The `await` keyword was not added
as it's not listed as a keyword yet.

Closes rust-lang#53077
pietroalbini added a commit to pietroalbini/rust that referenced this issue Aug 29, 2018
Generalize `async_idents` to all new keywords

This commit generalizes the existing `async_idents` lint to easily encompass
other identifiers that will be keywords in future editions. The new lint is
called `keyword_idents` and the old `async_idents` lint is registered as renamed
to this new lint.

As a proof of concept the `try` keyword was added to this list as it looks to be
listed as a keyword in the 2018 edition only. The `await` keyword was not added
as it's not listed as a keyword yet.

Closes rust-lang#53077
bors added a commit that referenced this issue Aug 30, 2018
Generalize `async_idents` to all new keywords

This commit generalizes the existing `async_idents` lint to easily encompass
other identifiers that will be keywords in future editions. The new lint is
called `keyword_idents` and the old `async_idents` lint is registered as renamed
to this new lint.

As a proof of concept the `try` keyword was added to this list as it looks to be
listed as a keyword in the 2018 edition only. The `await` keyword was not added
as it's not listed as a keyword yet.

Closes #53077
@fmease fmease added A-edition-2018 Area: The 2018 edition A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. and removed A-edition-2018-lints labels Dec 21, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-edition-2018 Area: The 2018 edition A-lints Area: Lints (warnings about flaws in source code) such as unused_mut. F-rust_2018_preview `#![feature(rust_2018_preview)]`
Projects
None yet
Development

No branches or pull requests

5 participants