-
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
impl Fn/FnMut/FnOnce for Arc/Rc #49224
Conversation
r? @sfackler (rust_highfive has picked a reviewer for you, use r? to override) |
r? @aturon |
Could you clarify how Rust 2018 is going to make this work? Both Rust 2015 and 2018 editions are going to share the same standard library. |
Ping from triage, @aturon — we eagerly await your review! |
☔ The latest upstream changes (presumably #48333) made this pull request unmergeable. Please resolve the merge conflicts. |
@rust-lang/infra Requesting crater run please! |
@bors try |
impl Fn/FnMut/FnOnce for Arc/Rc This PR introduces the ability to have `Rc/Arc<F>: Fn(A) -> B where F: Fn(A) -> B` and `Rc/Arc<Fn(A) -> B`. This was previously tried (and failed) in #34118 (comment) due to breakage with crater. But now that the new edition is approaching we might want to try this in edition 2018. We should probably do a new crater run to see how much the breakage has changed since the previous attempt. cc @aturon
☀️ Test successful - status-travis |
Crater run started. Expected ETA is in 5-6 days. |
☔ The latest upstream changes (presumably #50017) made this pull request unmergeable. Please resolve the merge conflicts. |
This probably cannot land as-is: the impls introduced appear to conflict with tokio-tls which is quite widely used: Crater results are at: http://cargobomb-reports.s3.amazonaws.com/pr-49224/index.html. 'Blacklisted' crates (spurious failures etc) can be found here. If you see any spurious failures not on the list, please make a PR against that file. (interested observers: Crater is a tool for testing the impact of changes on the crates.io ecosystem. You can find out more at the repo if you're curious) |
Ping from triage @aturon! What should we do with this PR? |
Unfortunately that's a pretty high number of regressions, so I'm going to close this. |
@alexcrichton Bummer on the regressions :( I'll have to look through the regressions to see how specialization affects those, but do you think perhaps specialization could be our saving grace here? |
Unsure, I just know we can't land this with so many known regressions. |
@alexcrichton Agreed on that :) |
This PR introduces the ability to have
Rc/Arc<F>: Fn(A) -> B where F: Fn(A) -> B
andRc/Arc<Fn(A) -> B
.This was previously tried (and failed) in #34118 (comment) due to breakage with crater. But now that the new edition is approaching we might want to try this in edition 2018. We should probably do a new crater run to see how much the breakage has changed since the previous attempt.
cc @aturon