Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make lang items usable from libsyntax #20541

Closed
nrc opened this issue Jan 4, 2015 · 3 comments
Closed

Make lang items usable from libsyntax #20541

nrc opened this issue Jan 4, 2015 · 3 comments
Labels
A-lang-item Area: Language items C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nrc
Copy link
Member

nrc commented Jan 4, 2015

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.

@kmcallister kmcallister changed the title lang items usable from libsyntax Make lang items usable from libsyntax Jan 4, 2015
@kmcallister kmcallister added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jan 4, 2015
@steveklabnik
Copy link
Member

Triage: one year later, as far as I know, lang items are still in rustc_middle.

@bstrie bstrie added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 11, 2016
@steveklabnik
Copy link
Member

Triage: same as in 2016.

@varkor varkor added the A-lang-item Area: Language items label May 8, 2019
@bjorn3
Copy link
Member

bjorn3 commented May 15, 2022

Fixed by #75145

@bjorn3 bjorn3 closed this as completed May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lang-item Area: Language items C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants