-
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
Rollup of 6 pull requests #98767
Rollup of 6 pull requests #98767
Conversation
Just like `Box<T>`, we want `ThinBox<T>` to be covariant in `T`, but the projection in `WithHeader<<T as Pointee>::Metadata>` was making it invariant. This is now hidden as `WithOpaqueHeader`, which we type-cast whenever the real `WithHeader<H>` type is needed.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
It makes the code a little nicer to read.
The `&[ast::Variant]` field isn't used. The `Vec<Ident>` field is only used for its length, but that's always the same as the length of the `&[Ident]` and so isn't necessary.
It's unused.
They are always `false`.
It's unused.
This was accidentally left behind in a previous commit.
Improve a comment, and panic on an impossible code path.
The existing derive code allows for various possibilities that aren't needed in practice, which complicates the code. There are only a few auto-derived traits and new ones are unlikely, so this commit simplifies things. - `PtrTy` has been eliminated. The `Raw` variant was never used, and the lifetime for the `Borrowed` variant was always `None`. That left just the mutability field, which has been inlined as necessary. - `MethodDef::explicit_self` was a confusing `Option<Option<PtrTy>>`. Indicating either `&self` or nothing. It's now a `bool`. - `borrowed_self` is renamed as `self_ref`. - `Ty::Ptr` is renamed to `Ty::Ref`.
It's unused.
Because a `Literal` is a type of expression, and is simply the wrong name for this.
Because that's all that is needed in practice.
…, r=compiler-errors Suggest blanket impl to the local traits This PR will add additional suggestion regarding the blanket implementation when it is possible, by generation a new help message + suggestion. Closes rust-lang#96076 Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Make `ThinBox<T>` covariant in `T` Just like `Box<T>`, we want `ThinBox<T>` to be covariant in `T`, but the projection in `WithHeader<<T as Pointee>::Metadata>` was making it invariant. This is now hidden as `WithOpaqueHeader`, which we type-cast whenever the real `WithHeader<H>` type is needed. Fixes the problem noted in <rust-lang#92791 (comment)>.
…_inc_clos_cap, r=lcnr fix ICE with -Wrust-2021-incompatible-closure-captures Fixes rust-lang#93117 Fixes rust-lang#96258
…lan-DPC fix grammar in useless doc comment lint
…rk-Simulacrum Many small deriving cleanups These commits remove lots of little unnecessary things, and clarifies other things. r? `@Mark-Simulacrum`
…on, r=Dylan-DPC Use const instead of function and make it private
@bors r+ rollup=never p=5 |
📌 Commit 6404620 has been approved by |
☀️ Test successful - checks-actions |
Tested on commit rust-lang/rust@5018181. Direct link to PR: <rust-lang/rust#98767> 💔 miri on linux: test-pass → test-fail (cc @oli-obk @RalfJung). 💔 rls on linux: test-pass → test-fail (cc @Xanewok).
Finished benchmarking commit (5018181): comparison url. Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Successful merges:
ThinBox<T>
covariant inT
#98585 (MakeThinBox<T>
covariant inT
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup