Skip to content

Enable #[diagnostic::on_unknown] during late res - #159413

Merged
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
mejrs:on_unknown_late
Jul 29, 2026
Merged

Enable #[diagnostic::on_unknown] during late res#159413
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
mejrs:on_unknown_late

Conversation

@mejrs

@mejrs mejrs commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

The pr prior to this is #157926. That PR enabled it for early res, this PR does so for late res.

r? @estebank

@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 16, 2026
@mejrs

mejrs commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

r? compiler

@rustbot rustbot assigned nnethercote and unassigned estebank Jul 25, 2026

@nnethercote nnethercote left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does it make sense to squash the commits? I can't tell how much of the commit separation is accidental vs deliberate.

View changes since this review

fn stuff(x: u32) {
match x {
empty::blah => {}
//~^ERROR cannot find unit struct, unit variant or constant `blah` in module `empty` [E0531]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Normally there's a space between the ~^ and ERROR. Likewise below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've added the space.

@mejrs

mejrs commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Does it make sense to squash the commits? I can't tell how much of the commit separation is accidental vs deliberate.

The commit separation (not necessarily the ordering) is deliberate. I generally try to make things easy to review so I'll split up a PR into commits that refactor/reorder but otherwise don't change meaning, and commits that add/change meaning.

And if I add/change diagnostic output I'll add a test in a first commit (with current output) and make changes in the second so that a commit-by-commit reviewer can see the output change.

In this case ideally there would be three commits, one with the test, another with the refactor and the third with the change, but I've diverged slightly. I hope that makes sense.

@mejrs
mejrs force-pushed the on_unknown_late branch from 671ca9b to 6a16546 Compare July 28, 2026 12:44
@rustbot

rustbot commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@mejrs
mejrs force-pushed the on_unknown_late branch from 6a16546 to bf4f8c1 Compare July 28, 2026 12:55

@nnethercote nnethercote left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@nnethercote

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

📌 Commit bf4f8c1 has been approved by nnethercote

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Jul 28, 2026
rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
Rollup of 11 pull requests

Successful merges:

 - #158168 (Added implementation on `set_permissions_nofollow` for all primary platforms)
 - #160055 (Simplify `MaybeRequiresStorage`)
 - #157226 (Partially stabilize `box_vec_non_null`)
 - #158879 (simplify `slice::Iter[Mut]::next_chunk` implementation)
 - #159413 (Enable `#[diagnostic::on_unknown]` during late res)
 - #160091 (Fix rustdoc toolbar height when title is taller than one line)
 - #158615 (fix: don't fire `explicit_outlives_requirements` on `?Sized` type params)
 - #159666 (fix(ld64.lld): route version mismatch warnings to linker_info on macOS)
 - #160032 (rustdoc-json: Make `Stability` compatible with non-self-describing serde formats)
 - #160039 (Add regression test for enum unconstrained parameter )
 - #160049 (Use assert_eq! in splat codegen tests)
rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
Rollup of 11 pull requests

Successful merges:

 - #158168 (Added implementation on `set_permissions_nofollow` for all primary platforms)
 - #160055 (Simplify `MaybeRequiresStorage`)
 - #157226 (Partially stabilize `box_vec_non_null`)
 - #158879 (simplify `slice::Iter[Mut]::next_chunk` implementation)
 - #159413 (Enable `#[diagnostic::on_unknown]` during late res)
 - #160091 (Fix rustdoc toolbar height when title is taller than one line)
 - #158615 (fix: don't fire `explicit_outlives_requirements` on `?Sized` type params)
 - #159666 (fix(ld64.lld): route version mismatch warnings to linker_info on macOS)
 - #160032 (rustdoc-json: Make `Stability` compatible with non-self-describing serde formats)
 - #160039 (Add regression test for enum unconstrained parameter )
 - #160049 (Use assert_eq! in splat codegen tests)
@rust-bors
rust-bors Bot merged commit 37c1398 into rust-lang:main Jul 29, 2026
13 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Jul 29, 2026
rust-timer added a commit that referenced this pull request Jul 29, 2026
Rollup merge of #159413 - mejrs:on_unknown_late, r=nnethercote

Enable `#[diagnostic::on_unknown]` during late res

The pr prior to this is #157926. That PR enabled it for early res, this PR does so for late res.

r? @estebank
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants