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

Do not remove fn headers (e.g., async) on extern fn items #4291

Merged
merged 2 commits into from
Jun 30, 2020

Conversation

topecongiro
Copy link
Contributor

Close #4288.

@@ -235,18 +235,18 @@ pub(crate) struct FnSig<'a> {

impl<'a> FnSig<'a> {
pub(crate) fn new(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it may be easier to use from_method_sig, which allows for dropping this method entirely. See https://github.com/rust-lang/rustfmt/pull/4290/files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! I like this idea better than mine. Thank you for creating the PR, and no worries about the duplicated work. GitHub UI is laggy these days.

Copy link
Member

@calebcartwright calebcartwright Jun 30, 2020

Choose a reason for hiding this comment

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

Related aside, we should probably rename from_method_sig to from_fn_sig at some point in the future. Believe that's one that we missed when incorporating the upstream rustc Method -> Fn renaming

topecongiro and others added 2 commits June 30, 2020 11:45
Closes rust-lang#4288

And we get to drop a method, which I think is a win :)
@calebcartwright
Copy link
Member

You both jumped on that one fast 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Async gets removed from extern blocks.
4 participants