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

HIR: separate AST and HIR lints #28145

Closed
nrc opened this issue Sep 1, 2015 · 3 comments
Closed

HIR: separate AST and HIR lints #28145

nrc opened this issue Sep 1, 2015 · 3 comments
Labels
A-HIR Area: The high-level intermediate representation (HIR)

Comments

@nrc
Copy link
Member

nrc commented Sep 1, 2015

Lints are a pain at the moment because they operate on the AST but need type info which belongs to the HIR. We should have two kinds of lints - purely syntactic ones which operate on the (expanded) AST and run early (before AST->HIR lowering) and ones which can access type info and operate on the HIR (in the current position). We probably need to think about how this will interact with the MIR too.

@Manishearth
Copy link
Member

#28192 moves lints to HIR so that existing lints can upgrade easily. As a next step we can move that folder to librustc_front/lint and restore the original librustc_lint. The only builtin lint that needs the AST is the unused parentheses one, and at the moment ExprParen exists in the HIR so it's not yet broken.

@eddyb
Copy link
Member

eddyb commented Sep 3, 2015

@Manishearth I'm not sure it's just the parenthesis lint, but at least that one can be moved to an AST lint later, if/when ExprParen is gone from the HIR.

@steveklabnik steveklabnik added the A-HIR Area: The high-level intermediate representation (HIR) label Sep 3, 2015
@nrc
Copy link
Member Author

nrc commented Sep 24, 2015

Closed by #28349

@nrc nrc closed this as completed Sep 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-HIR Area: The high-level intermediate representation (HIR)
Projects
None yet
Development

No branches or pull requests

4 participants