Skip to content

Remove MacroFileKind #2497

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

Merged
merged 1 commit into from
Dec 8, 2019
Merged

Conversation

edwin0cheng
Copy link
Member

This PR move to_macro_file_kind to hir_expand::db and use it to get the FragmentKind directly, such that we can remove MacroFileKind.

@flodiebold
Copy link
Member

I think that will fix the 'go to def' problem in #2489! I just found out the problem was that the SourceAnalyzer expanded the macro with MacroFileKind::Statements, while HIR body expansion always uses MacroFileKind::Expr so far.

@matklad
Copy link
Member

matklad commented Dec 8, 2019

Yes, this makes a lot of sense!

bors r+

bors bot added a commit that referenced this pull request Dec 8, 2019
2497: Remove MacroFileKind r=matklad a=edwin0cheng

This PR move `to_macro_file_kind` to `hir_expand::db` and use it to get the `FragmentKind` directly, such that we can remove `MacroFileKind`.

Co-authored-by: Edwin Cheng <[email protected]>
@bors
Copy link
Contributor

bors bot commented Dec 8, 2019

Build succeeded

  • Rust
  • TypeScript

@bors bors bot merged commit 509fedd into rust-lang:master Dec 8, 2019
@edwin0cheng edwin0cheng deleted the remove_macro_file_kind branch December 8, 2019 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants