-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Split out async_fn_in_trait into a separate feature #100734
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nagisa (or someone else) soon. Please see the contribution instructions for more information. |
☔ The latest upstream changes (presumably #100868) made this pull request unmergeable. Please resolve the merge conflicts. |
bca9a2a
to
636cabc
Compare
I’m not quite following what the value is behind making this change in isolation. Having a feature that simply makes certain constructs into an ICE doesn’t really help with testing the feature in any way or form, really. It also seems like a straightforward enough change that it could be introduced alongside other changes necessary to implement at least barebones support for the feature. |
I'm working with @ComputerDruid on this and I think it's an okay place to start! In total isolation I agree landing a change like this wouldn't make sense, but an actual implementation is being worked on right now and there are a couple threads happening in parallel, so let's start by landing just the feature gate. @bors r+ rollup |
add incomplete feature async_fn_in_trait Doesn't do much yet, just disables the check preventing the use of the syntax. Attempting to use it just results in ICE 🧊.
@bors r- please fix the tidy check on this, see #101182 (comment) |
r? @tmandry |
ceb5b20
to
d468cad
Compare
Done. |
@bors r+ rollup |
📌 Commit d468cadeedd950c711ea70e02f19d21be993d386 has been approved by It is now in the queue for this repository. |
@tmandry, I added a Do you think we need another feature gate? I'm fine if this PR is reworked to gate AFIT desugaring behind a different feature gate I guess, but I don' t personally see a benefit. Alternatively, this PR could be reworked to rename the gate from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you address these two comments then also add a test that checks async fn foo() -> impl Trait
requires both feature gates?
I "rebased" on #101224 . I still want to fix up a few things before this is merged:
|
I added the test, but it doesn't seem to require both features right now. Will need to debug that |
This comment has been minimized.
This comment has been minimized.
Should be fixed now. |
☔ The latest upstream changes (presumably #102061) made this pull request unmergeable. Please resolve the merge conflicts. |
@ComputerDruid sorry, I got sick over the weekend and forgot to r+. Please rebase this and then I can approve shortly. |
0845ffe
to
eca8dfb
Compare
PR rust-lang#101224 added support for async fn in trait desuraging behind the return_position_impl_trait_in_trait feature. Split this out so that it's behind its own feature gate, since async fn in trait doesn't need to follow the same stabilization schedule.
eca8dfb
to
d0a0749
Compare
rebased and squashed into one commit |
@bors r+ |
…iler-errors Split out async_fn_in_trait into a separate feature PR rust-lang#101224 added support for async fn in trait desuraging behind the `return_position_impl_trait_in_trait` feature. Split this out so that it's behind its own feature gate, since async fn in trait doesn't need to follow the same stabilization schedule.
…iler-errors Split out async_fn_in_trait into a separate feature PR rust-lang#101224 added support for async fn in trait desuraging behind the `return_position_impl_trait_in_trait` feature. Split this out so that it's behind its own feature gate, since async fn in trait doesn't need to follow the same stabilization schedule.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#100734 (Split out async_fn_in_trait into a separate feature) - rust-lang#101664 (Note if mismatched types have a similar name) - rust-lang#101815 (Migrated the rustc_passes annotation without effect diagnostic infrastructure) - rust-lang#102042 (Distribute rust-docs-json via rustup.) - rust-lang#102066 (rustdoc: remove unnecessary `max-width` on headers) - rust-lang#102095 (Deduplicate two functions that would soon have been three) - rust-lang#102104 (Set 'exec-env:RUST_BACKTRACE=0' in const-eval-select tests) - rust-lang#102112 (Allow full relro on powerpc64-unknown-linux-gnu) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
PR #101224 added support for async fn in trait desuraging behind the
return_position_impl_trait_in_trait
feature.Split this out so that it's behind its own feature gate, since async fn in trait doesn't need to follow the same stabilization schedule.