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

Support auto-import in macro #4268

Merged
merged 1 commit into from May 3, 2020

Conversation

edwin0cheng
Copy link
Member

@edwin0cheng edwin0cheng commented May 2, 2020

Fixed: #3854

&import,
edit.text_edit_builder(),
);
edit.target(range);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't get the AssistContext in this closure, so I pass the ctx to ActionBuilder. Another option is passing the ctx directly as closure arguments, but I don't want to change too much code. I will prefer to refactor it in other PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm currently trying to implement #1062 and looks like I will have to change it in order to use the insert_use_statement in ra_ide.

So give it a couple of weeks before doing the refactoring :)

@SomeoneToIgnore
Copy link
Contributor

bors r+

@bors
Copy link
Contributor

bors bot commented May 3, 2020

🔒 Permission denied

Existing reviewers: click here to make SomeoneToIgnore a reviewer

Copy link
Contributor

@SomeoneToIgnore SomeoneToIgnore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, so much for a try.
But I think it's fine to merge this as is.

@matklad
Copy link
Member

matklad commented May 3, 2020 via email

@bors
Copy link
Contributor

bors bot commented May 3, 2020

@bors bors bot merged commit 6a48a94 into rust-lang:master May 3, 2020
@edwin0cheng edwin0cheng deleted the auto-import-in-macros branch May 4, 2020 02: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.

Autoimport for paths used in a macro
3 participants