-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-lang-itemArea: Language itemsArea: Language itemsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Currently lang items are only available in the compiler proper, not in libsyntax. However, it is often useful to be able to use lang items for desugaring (see #20516, also range syntax which had to happen in the compiler rather than have a simple desugaring).
The solution I think, is to move the lang items code out of librustc and into libsyntax (or some other, new crate). However, lang items are based on def ids, and these do not exist as far as libsyntax is concerned (they are allocated in an early pass by librustc). Therefore to make this work, we have to change lang items to not use def ids, some how.
Metadata
Metadata
Assignees
Labels
A-lang-itemArea: Language itemsArea: Language itemsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.