Use a dummy TypeckResults instead of Option<TypeckResults> when linting#158000
Use a dummy TypeckResults instead of Option<TypeckResults> when linting#158000Jarcho wants to merge 4 commits into
TypeckResults instead of Option<TypeckResults> when linting#158000Conversation
|
cc @rust-lang/clippy |
|
r? @folkertdev rustbot has assigned @folkertdev. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
r? types |
|
The line the error is complaining about doesn't even exist anywhere. What is the miri test even building? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
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. |
|
☔ The latest upstream changes (presumably #158924) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
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_resultsmethod.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
LateContextand a lot of places downstream of that which would be a huge pain.