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

Move some things to rustc_type_ir #139722

Merged
merged 1 commit into from
Apr 14, 2025
Merged

Conversation

jackh726
Copy link
Member

This moves

  • PatternKind
  • FlagComputation
  • TypeWalker

into rustc_type_ir.

Not strictly required for rust-analyzer next-solve integration, but helps with code duplication.

r? types

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 12, 2025
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly fine, just some questions and some nitpicky cleanups that would be really nice

@@ -89,7 +89,6 @@ macro_rules! arena_types {
[] name_set: rustc_data_structures::unord::UnordSet<rustc_span::Symbol>,
[] autodiff_item: rustc_ast::expand::autodiff_attrs::AutoDiffItem,
[] ordered_name_set: rustc_data_structures::fx::FxIndexSet<rustc_span::Symbol>,
[] pats: rustc_middle::ty::PatternKind<'tcx>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this was just never used?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the IntoKind impl wants PatternKind to be Copy, so I added that derive, but then there are overlapping arena impls, so I just removed this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right, as soon as an impl is copy it's automatically arena internable.

@compiler-errors
Copy link
Member

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 12, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 12, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@rust-cloud-vms rust-cloud-vms bot force-pushed the patternkind-walk-toir branch from 139f120 to 4d76429 Compare April 12, 2025 22:33
@rustbot rustbot added A-rustdoc-search Area: Rustdoc's search feature T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Apr 12, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 12, 2025

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

changes to the core type system

cc @compiler-errors, @lcnr

changes to the core type system

cc @compiler-errors, @lcnr

@rust-cloud-vms rust-cloud-vms bot force-pushed the patternkind-walk-toir branch from 4d76429 to 10955ec Compare April 12, 2025 22:34
@jackh726
Copy link
Member Author

@compiler-errors Sorry, I had fixed some of the things you commented on and pushed, but to the wrong branch. Looking at your review and will fix the things that are relevant.

@rust-cloud-vms rust-cloud-vms bot force-pushed the patternkind-walk-toir branch from 10955ec to accae53 Compare April 12, 2025 22:46
@jackh726
Copy link
Member Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 12, 2025
@jackh726 jackh726 removed A-rustdoc-search Area: Rustdoc's search feature T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Apr 13, 2025
@compiler-errors
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 13, 2025

📌 Commit accae53 has been approved by compiler-errors

It is now in the queue for this repository.

@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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 13, 2025
ChrisDenton added a commit to ChrisDenton/rust that referenced this pull request Apr 13, 2025
…compiler-errors

Move some things to rustc_type_ir

This moves
- `PatternKind`
- `FlagComputation`
- `TypeWalker`

into rustc_type_ir.

Not strictly required for rust-analyzer next-solve integration, but helps with code duplication.

r? types
ChrisDenton added a commit to ChrisDenton/rust that referenced this pull request Apr 13, 2025
…compiler-errors

Move some things to rustc_type_ir

This moves
- `PatternKind`
- `FlagComputation`
- `TypeWalker`

into rustc_type_ir.

Not strictly required for rust-analyzer next-solve integration, but helps with code duplication.

r? types
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 13, 2025
…enton

Rollup of 12 pull requests

Successful merges:

 - rust-lang#138744 (Add methods to TCP and UDP sockets to modify hop limit (refresh of rust-lang#94678))
 - rust-lang#138962 (Expect an array when expected and acutal types are both arrays during cast)
 - rust-lang#139001 (add `naked_functions_rustic_abi` feature gate)
 - rust-lang#139379 (Use delayed bug for normalization errors in drop elaboration)
 - rust-lang#139582 (Various coercion cleanups)
 - rust-lang#139628 (Suggest remove redundant `$()?` around `vis`)
 - rust-lang#139644 (Micro-optimize `InstSimplify`'s `simplify_primitive_clone`)
 - rust-lang#139666 (cleanup `mir_borrowck`)
 - rust-lang#139674 (In `rustc_mir_transform`, iterate over index newtypes instead of ints)
 - rust-lang#139695 (compiletest: consistently use `camino::{Utf8Path,Utf8PathBuf}` throughout)
 - rust-lang#139722 (Move some things to rustc_type_ir)
 - rust-lang#139740 (Convert `tests/ui/lint/dead-code/self-assign.rs` to a known-bug test)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 14, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#138336 (Improve `-Z crate-attr` diagnostics)
 - rust-lang#139636 (Encode dep node edge count as u32 instead of usize)
 - rust-lang#139666 (cleanup `mir_borrowck`)
 - rust-lang#139695 (compiletest: consistently use `camino::{Utf8Path,Utf8PathBuf}` throughout)
 - rust-lang#139699 (Proactively update coroutine drop shim's phase to account for later passes applied during shim query)
 - rust-lang#139718 (enforce unsafe attributes in pre-2024 editions by default)
 - rust-lang#139722 (Move some things to rustc_type_ir)
 - rust-lang#139760 (UI tests: migrate remaining compile time `error-pattern`s to line annotations when possible)
 - rust-lang#139776 (Switch attrs to `diagnostic::on_unimplemented`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit bb93324 into rust-lang:master Apr 14, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 14, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 14, 2025
Rollup merge of rust-lang#139722 - jackh726:patternkind-walk-toir, r=compiler-errors

Move some things to rustc_type_ir

This moves
- `PatternKind`
- `FlagComputation`
- `TypeWalker`

into rustc_type_ir.

Not strictly required for rust-analyzer next-solve integration, but helps with code duplication.

r? types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants