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

refactor(rustc_middle): Substs -> GenericArg #113591

Merged
merged 1 commit into from Jul 14, 2023

Conversation

mdibaiee
Copy link
Contributor

@mdibaiee mdibaiee commented Jul 11, 2023

resolves #110793

  • rename SubstsRef and InternalSubsts to GenericArgsRef<'tcx> and GenericArgs<'tcx>.
  • rename variables and fields currently using substs to args.
  • update the module name of ty::subst to ty::generic_args or sth. Make that module private and publicly reexport its content in the ty module.
  • rename EarlyBinder::subst(_identity) to EarlyBinder::instantiate(_identity).
  • types called [a-zA-Z]+Substs renamed to XArgs.
  • functions containing substs now use args or generic_args (mostly the former).

However, the verb of "substituting" is still being used here and there, mostly in comments. I think that can be a separate PR as part of #110254 to change the verb to replace_generics or something similar.

@rustbot
Copy link
Collaborator

rustbot commented Jul 11, 2023

r? @oli-obk

(rustbot has picked a reviewer for you, use r? to override)

@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 Jul 11, 2023
@rust-log-analyzer

This comment has been minimized.

@mdibaiee
Copy link
Contributor Author

@rustbot label -S-waiting-on-review +S-waiting-on-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 Jul 11, 2023
@mdibaiee
Copy link
Contributor Author

r? ghost

@rustbot
Copy link
Collaborator

rustbot commented Jul 11, 2023

Failed to set assignee to ghost: invalid assignee

Note: Only org members, users with write permissions, or people who have commented on the PR may be assigned.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@mdibaiee mdibaiee reopened this Jul 12, 2023
@rustbot rustbot added the WG-trait-system-refactor The Rustc Trait System Refactor Initiative label Jul 12, 2023
@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-style Relevant to the style team, which will review and decide on the PR/issue. labels Jul 12, 2023
@mdibaiee mdibaiee force-pushed the genericargs-cleanup branch 2 times, most recently from 13eee97 to 0095115 Compare July 12, 2023 16:16
@rust-log-analyzer

This comment has been minimized.

@mdibaiee mdibaiee force-pushed the genericargs-cleanup branch 2 times, most recently from 3276d69 to 074f279 Compare July 12, 2023 16:42
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Jul 14, 2023

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 5767cad to master...

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5767cad): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.3%, 0.4%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-4.2%, -2.3%] 3
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.5% [1.5%, 4.6%] 7
Regressions ❌
(secondary)
5.9% [5.9%, 5.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.5% [1.5%, 4.6%] 7

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 659.454s -> 657.557s (-0.29%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-style Relevant to the style team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update internal terminology: Substs -> GenericArgs
10 participants