Skip to content

Use a dummy TypeckResults instead of Option<TypeckResults> when linting#158000

Open
Jarcho wants to merge 4 commits into
rust-lang:mainfrom
Jarcho:ownerless_typeck
Open

Use a dummy TypeckResults instead of Option<TypeckResults> when linting#158000
Jarcho wants to merge 4 commits into
rust-lang:mainfrom
Jarcho:ownerless_typeck

Conversation

@Jarcho

@Jarcho Jarcho commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Based on #157928

This brings the typeck results when linting back to what it was before #73743. The first four commits are from the first PR and handle eagerly fetching the typeck results and the workaround needed for rustdoc. The fifth commit adds a dummy ownerless typeck results and uses that as the initial value for the lint pass. The final commit just removes the now useless typeck_results method.

The dummy table is added to the global context more for convenience. It can't be a static since the lifetime argument is invariant. It could be created just for the linting, but that would need to add an extra lifetime parameter to LateContext and a lot of places downstream of that which would be a huge pain.

@rustbot

rustbot commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

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

cc @rust-lang/clippy

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. 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 Jun 17, 2026
@rustbot

rustbot commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

r? @folkertdev

rustbot has assigned @folkertdev.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 73 candidates
  • Random selection from 20 candidates

@rust-log-analyzer

This comment has been minimized.

@folkertdev

Copy link
Copy Markdown
Contributor

r? types

@rustbot rustbot added the T-types Relevant to the types team, which will review and decide on the PR/issue. label Jun 17, 2026
@rustbot rustbot assigned nikomatsakis and unassigned folkertdev Jun 17, 2026
@Jarcho

Jarcho commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

The line the error is complaining about doesn't even exist anywhere. What is the miri test even building?

@rust-bors

This comment has been minimized.

@Jarcho Jarcho force-pushed the ownerless_typeck branch from 27bc424 to 93e8014 Compare June 18, 2026 10:36
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Jarcho Jarcho force-pushed the ownerless_typeck branch from 93e8014 to ad83973 Compare June 18, 2026 10:47
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@Jarcho Jarcho force-pushed the ownerless_typeck branch from ad83973 to 831a118 Compare June 26, 2026 02:00
@rustbot

rustbot commented Jun 26, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. 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. T-types Relevant to the types team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants