Use a dummy TypeckResults instead of Option<TypeckResults> when linting#158000
Open
Jarcho wants to merge 6 commits into
Open
Use a dummy TypeckResults instead of Option<TypeckResults> when linting#158000Jarcho wants to merge 6 commits into
TypeckResults instead of Option<TypeckResults> when linting#158000Jarcho wants to merge 6 commits into
Conversation
…lue when linting.
Collaborator
|
cc @rust-lang/clippy |
Collaborator
|
r? @folkertdev rustbot has assigned @folkertdev. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
r? types |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.