-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #118188 - petrochenkov:defeed, r=<try>
[WIP] resolve: Feed the `opt_def_kind` query immediately on `DefId` creation ... for most `DefId`s. Right now the def kind query requires building HIR for no good reason, in this PR I'm trying to change that. In two cases the `DefKind` is not known early enough. - Choosing between `DefKind::Closure` and `DefKind::Coroutine` requires analyzing (expanded) closure body, which cannot be done in def collector. I think `DefKind::Coroutine` should be merged into `DefKind::Closure`, it's more useful to have all `DefKind`s early in resolver (perhaps even merge them with `DefPathData`s) than to make this specific distinction. - `opt_def_kind` should report `None` instead of `Some(DefKind::AnonConst)` for some specific subset of anonymous constants not know in def collector, otherwise code in other parts of the compiler panics. I'll try to get rid of this oddity in a separate PR. Submitting this in a WIP state for preliminary benchmarking.
- Loading branch information
Showing
15 changed files
with
250 additions
and
163 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.