Conversation
|
rustbot has assigned @Mark-Simulacrum. Use |
This comment has been minimized.
This comment has been minimized.
9eb5e67 to
d118c1c
Compare
library/alloc/src/vec/mod.rs
Outdated
| /// | ||
| /// ``` | ||
| /// #![feature(vec_recycle)] | ||
| /// #![feature(transmutability)] |
There was a problem hiding this comment.
Is the explicit transmutability feature flag needed for this example?
There was a problem hiding this comment.
Yes, the feature flag seems to propagate from the bound on the impl
There was a problem hiding this comment.
Hm, I wonder how Try avoids that.
There was a problem hiding this comment.
The initial TransmuteFrom trait is marked with unstable_feature_bound, while Try is not
There was a problem hiding this comment.
Oh, interesting! I didn't add that, and I'm curious why it was added (it's usually used to create unstable impls of stable traits). Hey @tiif, can you chime in as to why you added #[unstable_feature_bound(transmutability)] to TransmuteFrom here?
For context: We're using TransmuteFrom as a private implementation detail of Vec::recycle, but requiring users of recycle to have #![feature(transmutability)] even when they don't mention TransmuteFrom leaks that implementation detail.
There was a problem hiding this comment.
There is a #[unstable_feature_bound(transmutability)] for impl ConstParamTy_ for Assume {}. Since TransmuteFrom uses const ASSUME: Assume = { Assume::NOTHING } here, it needs to add #[unstable_feature_bound(transmutability)] too.
Unfortunately we haven't made it possible to stop propagating #[unstable_feature_bound] this way for now :(
d118c1c to
697a9e4
Compare
|
☔ The latest upstream changes (presumably #135634) made this pull request unmergeable. Please resolve the merge conflicts. |
697a9e4 to
280c6aa
Compare
This comment has been minimized.
This comment has been minimized.
|
@rustbot ready |
This comment has been minimized.
This comment has been minimized.
280c6aa to
33da728
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors r+ rollup |
…imulacrum `vec_recycle`: implementation Tracking issue: rust-lang#148227 Going with the `TransmuteFrom` approach suggested in rust-lang/libs-team#674 (comment), but a bit simplified. Currently does not work in some places where it should due to the limitations of the current implementation of the transmutability analysis: rust-lang#148227 (comment)
Rollup of 10 pull requests Successful merges: - #148416 (`vec_recycle`: implementation) - #148522 (Micro-optimize rustdoc search index parsing) - #148827 (Stabilize vec_into_raw_parts) - #148832 (Bump library dependencies) - #148836 (tweak primitive reference docs) - #148859 (Fix overflow-checks test for RISC-V target) - #148886 (Add riscv64a23-unknown-linux-gnu to build-manifest TARGETS) - #148956 (re-enable wasm abi test) - #148963 (runtest.rs: remove redundant check) - #148968 (Add another *ExprWithBlock* test for `try` blocks) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 11 pull requests Successful merges: - #148416 (`vec_recycle`: implementation) - #148522 (Micro-optimize rustdoc search index parsing) - #148827 (Stabilize vec_into_raw_parts) - #148832 (Bump library dependencies) - #148836 (tweak primitive reference docs) - #148859 (Fix overflow-checks test for RISC-V target) - #148886 (Add riscv64a23-unknown-linux-gnu to build-manifest TARGETS) - #148956 (re-enable wasm abi test) - #148963 (runtest.rs: remove redundant check) - #148968 (Add another *ExprWithBlock* test for `try` blocks) - #148984 (chore: Update annotate-snippets to 0.12.9) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #148416 - GrigorenkoPV:vec_recycle, r=Mark-Simulacrum `vec_recycle`: implementation Tracking issue: #148227 Going with the `TransmuteFrom` approach suggested in rust-lang/libs-team#674 (comment), but a bit simplified. Currently does not work in some places where it should due to the limitations of the current implementation of the transmutability analysis: #148227 (comment)
…imulacrum `vec_recycle`: implementation Tracking issue: rust-lang#148227 Going with the `TransmuteFrom` approach suggested in rust-lang/libs-team#674 (comment), but a bit simplified. Currently does not work in some places where it should due to the limitations of the current implementation of the transmutability analysis: rust-lang#148227 (comment)
Tracking issue: #148227
Going with the
TransmuteFromapproach suggested in rust-lang/libs-team#674 (comment), but a bit simplified.Currently does not work in some places where it should due to the limitations of the current implementation of the transmutability analysis: #148227 (comment)