-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Implement phantom variance markers #135807
Conversation
This comment has been minimized.
This comment has been minimized.
caed822
to
3166da0
Compare
3166da0
to
c558d94
Compare
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.
Correct me if I'm wrong, but I think these should be the other way around
c558d94
to
ff415fe
Compare
Swapped the descriptions so as to be correct, reworded them a bit for clarity, and added an example (contrived as it may be). |
I never remember which variance is which, so hopefully a random roll will find someone who does 🤞 r? libs |
In the ACP, we suggested making these types work like |
Why should that be a blocker? It's backwards compatible to eliminate the need for |
While it is backwards-compatible, we are generally reluctant to stabilize functions that we known are going to be deprecated eventually. In any case, this PR is fine for an initial implementation. |
ff415fe
to
b3a5d0a
Compare
Gotcha. I'll add that as an unresolved question in the tracking issue. |
@bors r+ |
Implement phantom variance markers ACP accepted rust-lang/libs-team#488 Tracking issue rust-lang#135806
Rollup of 5 pull requests Successful merges: - rust-lang#135807 (Implement phantom variance markers) - rust-lang#136091 (Add some tracing to core bootstrap logic) - rust-lang#136094 (Upgrade elsa to the newest version.) - rust-lang#136097 (rustc_ast: replace some len-checks + indexing with slice patterns etc.) - rust-lang#136101 (triagebot: set myself on vacation) r? `@ghost` `@rustbot` modify labels: rollup
…llaumeGomez Rollup of 10 pull requests Successful merges: - rust-lang#135773 (Clarify WindowsMut (Lending)Iterator) - rust-lang#135807 (Implement phantom variance markers) - rust-lang#135876 (fix doc for std::sync::mpmc) - rust-lang#135988 (Add a workaround for parallel rustc crashing when there are delayed bugs) - rust-lang#136037 (Mark all NuttX targets as tier 3 target and support the standard library) - rust-lang#136064 (Add a suggestion to cast target_feature fn items to fn pointers.) - rust-lang#136082 (Incorporate `iter_nodes` into `graph::DirectedGraph`) - rust-lang#136112 (Clean up all dead files inside `tests/ui/`) - rust-lang#136114 (Use identifiers more in diagnostics code) - rust-lang#136118 (Change `collect_and_partition_mono_items` tuple return type to a struct) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#135807 - jhpratt:phantom-variance, r=Amanieu Implement phantom variance markers ACP accepted rust-lang/libs-team#488 Tracking issue rust-lang#135806
ACP accepted rust-lang/libs-team#488
Tracking issue #135806