Allow for a missing `adt_def` in `NamePrivacyVisitor`. by nnethercote · Pull Request #121482 · rust-lang/rust

@nnethercote

This was caused by 72b172b in rust-lang#121206. That commit removed an early
return from `analysis` when there are stashed errors. As a result, it's
possible to reach privacy analysis when there are stashed errors, which
means more code paths can be reached. One such code path was handled in
that commit, where a `span_bug` was changed to a `span_delayed_bug`.

This commit handles another such code path uncovered by fuzzing, in much
the same way.

Fixes rust-lang#121455.

@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

Feb 23, 2024

oli-obk

oli-obk

@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

Feb 23, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 23, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Feb 23, 2024

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Feb 23, 2024
Rollup merge of rust-lang#121482 - nnethercote:fix-121455, r=oli-obk

Allow for a missing `adt_def` in `NamePrivacyVisitor`.

This was caused by 72b172b in rust-lang#121206. That commit removed an early return from `analysis` when there are stashed errors. As a result, it's possible to reach privacy analysis when there are stashed errors, which means more code paths can be reached. One such code path was handled in that commit, where a `span_bug` was changed to a `span_delayed_bug`.

This commit handles another such code path uncovered by fuzzing, in much the same way.

Fixes rust-lang#121455.

r? `@oli-obk`

nnethercote added a commit to nnethercote/rust that referenced this pull request

Feb 27, 2024

nnethercote added a commit to nnethercote/rust that referenced this pull request

Feb 27, 2024

nnethercote added a commit to nnethercote/rust that referenced this pull request

Feb 27, 2024

nnethercote added a commit to nnethercote/rust that referenced this pull request

Feb 29, 2024

nnethercote added a commit to nnethercote/rust that referenced this pull request

Mar 1, 2024