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

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

Closed
zackmdavis opened this issue Aug 5, 2018 · 1 comment
Closed
Assignees
Labels
A-edition-2018-lints Area: Lints supporting the 2018 edition A-rust-2018-preview Area: The 2018 edition 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
@scottmcm scottmcm added the A-edition-2018-lints Area: Lints supporting the 2018 edition label Aug 5, 2018
@scottmcm scottmcm added this to the Rust 2018 RC milestone Aug 5, 2018
@Mark-Simulacrum Mark-Simulacrum added the A-rust-2018-preview Area: The 2018 edition preview label Aug 5, 2018
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-edition-2018-lints Area: Lints supporting the 2018 edition A-rust-2018-preview Area: The 2018 edition preview
Projects
None yet
Development

No branches or pull requests

4 participants