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

rustc: Move features from Session to GlobalCtxt #114723

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

petrochenkov
Copy link
Contributor

Removes one more piece of mutable state.
Follow up to #114622.

The rule I used for passing feature in function signatures:

  • if a crate already depends on rustc_middle, then Session is replaced with TyCtxt
  • otherwise session and features are passed as a pair sess: &Session, features: &Features

The code in rustc_lint is ultimately used for implementing a trait from rustc_expand, so it also doesn't use tcx despite the dependency on rustc_middle.

Removes two pieces of mutable state.
Follow up to rust-lang#114622.
@rustbot
Copy link
Collaborator

rustbot commented Aug 11, 2023

r? @davidtwco

(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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 11, 2023
@rustbot
Copy link
Collaborator

rustbot commented Aug 11, 2023

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.

@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 11, 2023

📌 Commit 7353c96 has been approved by davidtwco

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 Aug 11, 2023
@bors
Copy link
Contributor

bors commented Aug 13, 2023

⌛ Testing commit 7353c96 with merge d2c5db06389ecc1784dae0b622b0862b2f7a5e29...

@bors
Copy link
Contributor

bors commented Aug 13, 2023

☀️ Test successful - checks-actions
Approved by: davidtwco
Pushing d2c5db06389ecc1784dae0b622b0862b2f7a5e29 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 13, 2023
@bors
Copy link
Contributor

bors commented Aug 13, 2023

👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d2c5db06389ecc1784dae0b622b0862b2f7a5e29): comparison URL.

Overall result: ✅ improvements - 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
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
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)
2.7% [2.7%, 2.7%] 1
Regressions ❌
(secondary)
3.5% [2.4%, 6.0%] 8
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.1% [-5.0%, -1.5%] 8
All ❌✅ (primary) 2.7% [2.7%, 2.7%] 1

Cycles

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

Binary size

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

Bootstrap: 632.358s -> 633.497s (0.18%)

@cjgillot
Copy link
Contributor

@bors retry : Test was successful, but fast-forwarding failed: 422 Update is not a fast forward

@bors
Copy link
Contributor

bors commented Aug 13, 2023

⌛ Testing commit 7353c96 with merge 5f3abbc...

@bors
Copy link
Contributor

bors commented Aug 13, 2023

☀️ Test successful - checks-actions
Approved by: davidtwco
Pushing 5f3abbc to master...

@bors bors merged commit 5f3abbc into rust-lang:master Aug 13, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Aug 13, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5f3abbc): comparison URL.

Overall result: ✅ improvements - 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
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.2%] 2
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)
2.9% [0.8%, 6.0%] 11
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.2% [-5.2%, -1.7%] 10
All ❌✅ (primary) - - 0

Cycles

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

Binary size

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

Bootstrap: 634.852s -> 634.77s (-0.01%)

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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants