Skip to content

Methods Fn(Mut,Once)::call(mut,once) are gated with two feature gates, remove one of them #34802

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Aug 1, 2016

Conversation

petrochenkov
Copy link
Contributor

@petrochenkov petrochenkov commented Jul 13, 2016

Methods Fn::call, FnMut::call_mut and FnOnce::call_once are gated with usual library feature fn_traits and also hardcoded in the compiler and gated once more with feature unboxed_closures
This patch removes the unboxed_closuresfeature gate from these methods (unboxed_closures is still used for other things though), now they are gated only with fn_traits.

All unnecessary #![feature(unboxed_closures)]s are removed, many of them are old and were already unnecessary before the change this PR does.

@pnkfelix
Copy link
Member

This seems fine.

I was a little concerned about whether it was okay to remove a feature gate like this without consulting the language team, but it seems that in all cases where an actual feature was/is being properly gated, it continues to be gated (by some other feature gate).

@eddyb has pointed out that the rust-call fn ABI itself should be feature-gated and is not, which is dangerous, but is not itself a reason to hold off on this PR, AFAICT.

@bors
Copy link
Collaborator

bors commented Jul 28, 2016

☔ The latest upstream changes (presumably #34485) made this pull request unmergeable. Please resolve the merge conflicts.

…ed_closures`

They are already gated with feature `fn_traits`
@petrochenkov
Copy link
Contributor Author

Rebased.

@eddyb
Copy link
Member

eddyb commented Aug 1, 2016

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Aug 1, 2016

📌 Commit a80d329 has been approved by eddyb

sanxiyn added a commit to sanxiyn/rust that referenced this pull request Aug 1, 2016
Methods `Fn(Mut,Once)::call(mut,once)` are gated with two feature gates, remove one of them

Methods `Fn::call`, `FnMut::call_mut` and `FnOnce::call_once` are gated with usual library feature `fn_traits` and also hardcoded in the compiler and gated once more with feature `unboxed_closures`
This patch removes the `unboxed_closures`feature gate from these methods (`unboxed_closures` is still used for other things though), now they are gated only with `fn_traits`.

All unnecessary `#![feature(unboxed_closures)]`s are removed, many of them are old and were already unnecessary before the change this PR does.
bors added a commit that referenced this pull request Aug 1, 2016
Rollup of 8 pull requests

- Successful merges: #34802, #35033, #35085, #35114, #35134, #35140, #35141, #35157
- Failed merges:
@bors bors merged commit a80d329 into rust-lang:master Aug 1, 2016
@petrochenkov petrochenkov deleted the call branch September 21, 2016 20:02
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants