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

Rename *.node to *.kind, and hair::Pattern* to hair::Pat* #64813

Merged
merged 19 commits into from
Sep 27, 2019

Conversation

varkor
Copy link
Member

@varkor varkor commented Sep 26, 2019

In both ast::Expr and hir::Expr:

  • Rename Expr.node to Expr.kind.
  • Rename Pat.node to Pat.kind.
  • Rename ImplItem.node to ImplItem.kind.
  • Rename Lit.node to Lit.kind.
  • Rename TraitItem.node to TraitItem.kind.
  • Rename Ty.node to Ty.kind.
  • Rename Stmt.node to Stmt.kind.
  • Rename Item.node to Item.kind.
  • Rename ForeignItem.node to ForeignItem.kind.
  • Rename MetaItem.node to MetaItem.kind.

Also:

  • Rename hair::FieldPattern to hair::FieldPat.
  • Rename hair::PatternKind to hair::PatKind.
  • Rename hair::PatternRange to hair::PatRange.
  • Rename PatternContext to PatCtxt.
  • Rename PatternTypeProjection to PatTyProj.
  • Rename hair::Pattern to hair::Pat.

These two sets of changes are grouped together to aid with merging. The only changes are renamings.

r? @petrochenkov

@varkor

This comment has been minimized.

@varkor varkor changed the title Rename Expr.node to Expr.kind. Rename (Expr|Pat).node to $1.kind Sep 26, 2019
@Centril
Copy link
Contributor

Centril commented Sep 26, 2019

Did you check HAIR as well?

@Centril
Copy link
Contributor

Centril commented Sep 26, 2019

Also it might be easier to merge this if you split it into several PRs (e.g. one for AST, one for HIR, ...).

@varkor
Copy link
Member Author

varkor commented Sep 26, 2019

I'm renaming anything with the same name, so it's easiest to target AST and HIR at once (and HAIR if it has the same names). It'll be more difficult to merge, but I figure it's easier to merge one conflict-prone PR than several.

@varkor varkor changed the title Rename (Expr|Pat).node to $1.kind Rename *.node to *.kind for various types Sep 26, 2019
@Centril
Copy link
Contributor

Centril commented Sep 26, 2019

The advantage of several smaller PRs is that I can make rollups with them -- and because you would be touching different parts of the compiler, you're unlikely to cause conflicts several times in one PR.

@varkor varkor changed the title Rename *.node to *.kind for various types Rename *.node to *.kind Sep 26, 2019
@varkor varkor changed the title Rename *.node to *.kind Rename *.node to *.kind, and hair::Pattern* to hair::Pat* Sep 26, 2019
@Centril
Copy link
Contributor

Centril commented Sep 26, 2019

@bors r+ p=100 rollup=never

@bors
Copy link
Contributor

bors commented Sep 26, 2019

📌 Commit ff4ed8c has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 26, 2019
@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Sep 27, 2019
@Centril
Copy link
Contributor

Centril commented Sep 27, 2019

@bors r+

@bors
Copy link
Contributor

bors commented Sep 27, 2019

📌 Commit 80b63dd has been approved by Centril

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 27, 2019
@bors
Copy link
Contributor

bors commented Sep 27, 2019

⌛ Testing commit 80b63dd with merge 590ae0e...

bors added a commit that referenced this pull request Sep 27, 2019
Rename `*.node` to `*.kind`, and `hair::Pattern*` to `hair::Pat*`

In both `ast::Expr` and `hir::Expr`:

- Rename `Expr.node` to `Expr.kind`.
- Rename `Pat.node` to `Pat.kind`.
- Rename `ImplItem.node` to `ImplItem.kind`.
- Rename `Lit.node` to `Lit.kind`.
- Rename `TraitItem.node` to `TraitItem.kind`.
- Rename `Ty.node` to `Ty.kind`.
- Rename `Stmt.node` to `Stmt.kind`.
- Rename `Item.node` to `Item.kind`.
- Rename `ForeignItem.node` to `ForeignItem.kind`.
- Rename `MetaItem.node` to `MetaItem.kind`.

Also:
- Rename `hair::FieldPattern` to `hair::FieldPat`.
- Rename `hair::PatternKind` to `hair::PatKind`.
- Rename `hair::PatternRange` to `hair::PatRange`.
- Rename `PatternContext` to `PatCtxt`.
- Rename `PatternTypeProjection` to `PatTyProj`.
- Rename `hair::Pattern` to `hair::Pat`.

These two sets of changes are grouped together to aid with merging. The only changes are renamings.

r? @petrochenkov
@bors
Copy link
Contributor

bors commented Sep 27, 2019

☀️ Test successful - checks-azure
Approved by: Centril
Pushing 590ae0e to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 27, 2019
@bors bors merged commit 80b63dd into rust-lang:master Sep 27, 2019
@rust-highfive
Copy link
Collaborator

📣 Toolstate changed by #64813!

Tested on commit 590ae0e.
Direct link to PR: #64813

💔 clippy-driver on windows: test-pass → build-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra).

rust-highfive added a commit to rust-lang-nursery/rust-toolstate that referenced this pull request Sep 27, 2019
Tested on commit rust-lang/rust@590ae0e.
Direct link to PR: <rust-lang/rust#64813>

💔 clippy-driver on windows: test-pass → build-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra).
💔 clippy-driver on linux: test-pass → build-fail (cc @mcarton @oli-obk @Manishearth @flip1995 @yaahc @phansch @llogiq, @rust-lang/infra).
flip1995 added a commit to flip1995/rust-clippy that referenced this pull request Sep 27, 2019
bors added a commit to rust-lang/rust-clippy that referenced this pull request Sep 27, 2019
bors added a commit to rust-lang/rust-clippy that referenced this pull request Sep 27, 2019
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 27, 2019
Changes:
````
Remove clippy::author attribute from trailing_zeroes test
Move author issue test to author subdir
Fix author lint
Rustup to rust-lang#64813
Refactor `booleans`
Detect assignment ops in integer_arithmetic
````
bors added a commit that referenced this pull request Sep 27, 2019
submodules: update clippy from 68ff8b1 to edd9047

Changes:
````
Remove clippy::author attribute from trailing_zeroes test
Move author issue test to author subdir
Fix author lint
Rustup to #64813
Refactor `booleans`
Detect assignment ops in integer_arithmetic
````

Fixes #64843

r? @oli-obk  @Manishearth
flip1995 pushed a commit to flip1995/rust-clippy that referenced this pull request May 5, 2020
Changes:
````
Remove clippy::author attribute from trailing_zeroes test
Move author issue test to author subdir
Fix author lint
Rustup to rust-lang/rust#64813
Refactor `booleans`
Detect assignment ops in integer_arithmetic
````
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants