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

Cleanup error handlers #118470

Merged
merged 15 commits into from
Dec 2, 2023
Merged

Conversation

nnethercote
Copy link
Contributor

Mostly by making function naming more consistent. More to do after this, but this is enough for one PR.

r? compiler-errors

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Nov 30, 2023
@rustbot
Copy link
Collaborator

rustbot commented Nov 30, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes might have occurred in exhaustiveness checking

cc @Nadrieril

rust-analyzer is developed in its own repository. If possible, consider making this change to rust-lang/rust-analyzer instead.

cc @rust-lang/rust-analyzer

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred to the core trait solver

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

Some changes occurred in const_evaluatable.rs

cc @BoxyUwU

@@ -110,7 +110,7 @@ struct LayoutCx<'a> {
impl<'a> LayoutCalculator for LayoutCx<'a> {
type TargetDataLayoutRef = &'a TargetDataLayout;

fn delay_bug(&self, txt: String) {
fn delayed_bug(&self, txt: String) {
Copy link
Member

@lnicola lnicola Nov 30, 2023

Choose a reason for hiding this comment

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

CC @Veykril this will be fun to handle.

EDIT: for context, when RA is built outside of rust-lang/rust, it uses a version ra_ap_rustc_abi from crates.io that gets published every Tuesday. So no need to do anything @nnethercote, we just have to be a little careful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That particular commit isn't that important, so if it's a pain I can just remove it.

Copy link
Member

Choose a reason for hiding this comment

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

No, don't worry about it.

Copy link
Member

Choose a reason for hiding this comment

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

Isn't that only a problem when we do a sync while the changes haven't been pushed to crates io yet? fwiw we can change the autopublish time to be right before your usual sync times if you want

Copy link
Member

Choose a reason for hiding this comment

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

It is, but it's easy to patch when syncing back, then undo that when we upgrade to the published version.

@rustbot
Copy link
Collaborator

rustbot commented Dec 1, 2023

Some changes occurred in need_type_info.rs

cc @lcnr

@nnethercote
Copy link
Contributor Author

I added a few more commits. I'll stop now, I promise :)

`ErrorGuaranteed` should be used for all error methods involving the
`Error` level, e.g. as is done for the corresponding `span_err` methods.
Because `span_note_diag` doesn't follow the naming structure used for
the error reporting functions.
To match the `FailureNote` variant of `Level`.
Because the variant name in `Level` is `Note`, and the `without_error`
suffix is omitted in similar cases like `struct_allow` and
`struct_help`.
…bug`.

Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug`
follows the pattern used everywhere else: `span_err`, `span_warning`,
etc.
…ed_bugs`.

For reasons similar to the previous commit.
- Avoid unnecessary `inner` local variables.
- Use `borrow_mut` everywhere (instead of the synonym `lock`).
@nnethercote nnethercote force-pushed the cleanup-error-handlers branch from 40d6f9f to 61f9356 Compare December 1, 2023 22:09
@nnethercote
Copy link
Contributor Author

I added the requested comment.

@nnethercote
Copy link
Contributor Author

@bors r=compiler-errors

@bors
Copy link
Contributor

bors commented Dec 1, 2023

📌 Commit 61f9356 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 Dec 1, 2023
@bors
Copy link
Contributor

bors commented Dec 2, 2023

⌛ Testing commit 61f9356 with merge 2da59b8...

@bors
Copy link
Contributor

bors commented Dec 2, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing 2da59b8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 2, 2023
@bors bors merged commit 2da59b8 into rust-lang:master Dec 2, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Dec 2, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2da59b8): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

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.5% [2.5%, 2.5%] 1
Regressions ❌
(secondary)
2.1% [1.3%, 2.9%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.5% [2.5%, 2.5%] 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: 672.083s -> 671.012s (-0.16%)
Artifact size: 313.95 MiB -> 313.93 MiB (-0.01%)

matthiaskrgr added a commit to matthiaskrgr/icemaker that referenced this pull request Dec 2, 2023
@nnethercote nnethercote deleted the cleanup-error-handlers branch December 3, 2023 10:34
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Dec 5, 2023
…-2, r=compiler-errors

Cleanup error handlers some more

A sequel to rust-lang#118470.

r? `@compiler-errors`
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Dec 5, 2023
…-2, r=compiler-errors

Cleanup error handlers some more

A sequel to rust-lang#118470.

r? ``@compiler-errors``
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Dec 5, 2023
…-2, r=compiler-errors

Cleanup error handlers some more

A sequel to rust-lang#118470.

r? ```@compiler-errors```
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 6, 2023
Rollup merge of rust-lang#118587 - nnethercote:cleanup-error-handlers-2, r=compiler-errors

Cleanup error handlers some more

A sequel to rust-lang#118470.

r? ```@compiler-errors```
flip1995 pushed a commit to flip1995/rust that referenced this pull request Dec 16, 2023
…r=compiler-errors

Cleanup error handlers

Mostly by making function naming more consistent. More to do after this, but this is enough for one PR.

r? compiler-errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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. 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.

7 participants