-
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 5 pull requests #127486
Rollup of 5 pull requests #127486
Commits on Jul 4, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 36b1f44 - Browse repository at this point
Copy the full SHA 36b1f44View commit details -
Forbid casts of raw pointers to trait objects with the same trait, bu…
…t different args
Configuration menu - View commit details
-
Copy full SHA for d06cf5b - Browse repository at this point
Copy the full SHA d06cf5bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e8ef92 - Browse repository at this point
Copy the full SHA 9e8ef92View commit details -
Add more checks for pointers with vtable meta
The rules for casting `*mut X<dyn A>` -> `*mut Y<dyn B>` are as follows: - If `B` has a principal - `A` must have exactly the same principal (including generics) - Auto traits of `B` must be a subset of autotraits in `A` Note that `X<_>` and `Y<_>` can be identity, or arbitrary structs with last field being the dyn type. The lifetime of the trait object itself (`dyn ... + 'a`) is not checked. This prevents a few soundness issues with `#![feature(arbitrary_self_types)]` and trait upcasting. Namely, these checks make sure that vtable is always valid for the pointee.
Configuration menu - View commit details
-
Copy full SHA for 5645e8e - Browse repository at this point
Copy the full SHA 5645e8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb651d3 - Browse repository at this point
Copy the full SHA bb651d3View commit details -
Disallow
dyn Trait -> dyn Auto
backI think it's fine, but let's ask T-lang separately.
Configuration menu - View commit details
-
Copy full SHA for eac4916 - Browse repository at this point
Copy the full SHA eac4916View commit details -
Configuration menu - View commit details
-
Copy full SHA for e85295c - Browse repository at this point
Copy the full SHA e85295cView commit details -
Configuration menu - View commit details
-
Copy full SHA for c743557 - Browse repository at this point
Copy the full SHA c743557View commit details -
Configuration menu - View commit details
-
Copy full SHA for 340d69b - Browse repository at this point
Copy the full SHA 340d69bView commit details -
Delete
CloneAny
fromrust-analyzer
's fork ofAnyMap
...because it's very sketchy and causes FCWs. In this case it *is* actually sound, but still. I should write a better fork of anymap...
Configuration menu - View commit details
-
Copy full SHA for 06863ee - Browse repository at this point
Copy the full SHA 06863eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for cf7032f - Browse repository at this point
Copy the full SHA cf7032fView commit details -
Configuration menu - View commit details
-
Copy full SHA for b16f803 - Browse repository at this point
Copy the full SHA b16f803View commit details -
Configuration menu - View commit details
-
Copy full SHA for dc420a2 - Browse repository at this point
Copy the full SHA dc420a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 52ba120 - Browse repository at this point
Copy the full SHA 52ba120View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ef533e - Browse repository at this point
Copy the full SHA 9ef533eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a1f20f1 - Browse repository at this point
Copy the full SHA a1f20f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 56de9da - Browse repository at this point
Copy the full SHA 56de9daView commit details
Commits on Jul 5, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 073f3a2 - Browse repository at this point
Copy the full SHA 073f3a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6aebb2c - Browse repository at this point
Copy the full SHA 6aebb2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for b97f83b - Browse repository at this point
Copy the full SHA b97f83bView commit details
Commits on Jul 6, 2024
-
Update compiler/rustc_mir_transform/src/gvn.rs
Co-authored-by: Michael Goulet <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 12edc8d - Browse repository at this point
Copy the full SHA 12edc8dView commit details -
Mark format! with must_use hint
lukas committedJul 6, 2024 Configuration menu - View commit details
-
Copy full SHA for 3e9c9a0 - Browse repository at this point
Copy the full SHA 3e9c9a0View commit details
Commits on Jul 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a0f2b41 - Browse repository at this point
Copy the full SHA a0f2b41View commit details -
Configuration menu - View commit details
-
Copy full SHA for f3c13bf - Browse repository at this point
Copy the full SHA f3c13bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8076a33 - Browse repository at this point
Copy the full SHA 8076a33View commit details
Commits on Jul 8, 2024
-
Rollup merge of rust-lang#120248 - WaffleLapkin:bonk-ptr-object-casts…
…, r=compiler-errors,oli-obk,lnicola Make casts of pointers to trait objects stricter This is an attempt to `fix` rust-lang#120222 and rust-lang#120217. This is done by adding restrictions on casting pointers to trait objects. Before this PR the rules were as follows: > When casting `*const X<dyn A>` -> `*const Y<dyn B>`, principal traits in `A` and `B` must refer to the same trait definition (or no trait). With this PR the rules are changed to > When casting `*const X<dyn Src>` -> `*const Y<dyn Dst>` > - if `Dst` has a principal trait `DstP`, > - `Src` must have a principal trait `SrcP` > - `dyn SrcP` and `dyn DstP` must be the same type (modulo the trait object lifetime, `dyn T+'a` -> `dyn T+'b` is allowed) > - Auto traits in `Dst` must be a subset of auto traits in `Src` > - Not adhering to this is currently a FCW (warn-by-default + `FutureReleaseErrorReportInDeps`), instead of an error > - if `Src` has a principal trait `Dst` must as well > - this restriction will be removed in a follow up PR This ensures that 1. Principal trait's generic arguments match (no `*const dyn Tr<A>` -> `*const dyn Tr<B>` casts, which are a problem for [rust-lang#120222](rust-lang#120222)) 2. Principal trait's lifetime arguments match (no `*const dyn Tr<'a>` -> `*const dyn Tr<'b>` casts, which are a problem for [rust-lang#120217](rust-lang#120217)) 3. No auto traits can be _added_ (this is a problem for arbitrary self types, see [this comment](rust-lang#120248 (comment))) Some notes: - We only care about the metadata/last field, so you can still cast `*const dyn T` to `*const WithHeader<dyn T>`, etc - The lifetime of the trait object itself (`dyn A + 'lt`) is not checked, so you can still cast `*mut FnOnce() + '_` to `*mut FnOnce() + 'static`, etc - This feels fishy, but I couldn't come up with a reason it must be checked The diagnostics are currently not great, to say the least, but as far as I can tell this correctly fixes the issues. cc `@oli-obk` `@compiler-errors` `@lcnr`
Configuration menu - View commit details
-
Copy full SHA for c4ee2df - Browse repository at this point
Copy the full SHA c4ee2dfView commit details -
Rollup merge of rust-lang#127355 - aceArt-GmbH:126475, r=oli-obk
Mark format! with must_use hint Uses unstable feature rust-lang#94745 Part of rust-lang#126475 First contribution to rust, please let me know if the blessing of tests is correct Thanks `@bjorn3` for the help
Configuration menu - View commit details
-
Copy full SHA for 5b6eb28 - Browse repository at this point
Copy the full SHA 5b6eb28View commit details -
Rollup merge of rust-lang#127399 - cjgillot:issue-127396, r=oli-obk
Verify that allocations output by GVN are sufficiently aligned. Fixes rust-lang#127396 r? `@oli-obk`
Configuration menu - View commit details
-
Copy full SHA for 3e8e8df - Browse repository at this point
Copy the full SHA 3e8e8dfView commit details -
Rollup merge of rust-lang#127460 - Borgerr:clarify-drop-comment, r=jh…
…pratt clarify `sys::unix::fd::FileDesc::drop` comment closes rust-lang#66876 simply clarifies some resource-relevant things regarding the `close` syscall to reduce the amount of search needed in other parts of the web.
Configuration menu - View commit details
-
Copy full SHA for 55d25ce - Browse repository at this point
Copy the full SHA 55d25ceView commit details -
Rollup merge of rust-lang#127467 - GrigorenkoPV:bootstrap-once_cell, …
…r=clubby789 bootstrap: once_cell::sync::Lazy -> std::sync::LazyLock Since rust-lang#121377 has landed on beta
Configuration menu - View commit details
-
Copy full SHA for a659f7a - Browse repository at this point
Copy the full SHA a659f7aView commit details