-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Rollup of 5 pull requests #145805
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 #145805
Conversation
Only run the pull workflow once per week
The official Discord server is no longer active (cannot be posted to).
Remove mentions of Discord.
…english-writing Add a tip for english writing
Also, remove redundant word
place link on the more suitable text
This updates the rust-version file to 425a9c0.
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 425a9c0 Filtered ref: 26b9fd24259f4fc5fd7634a99dd6dda2821fb2d0 This merge was created using https://github.com/rust-lang/josh-sync.
Rustc pull update
Fixes an issue where if the underlying `Once` panics because it is poisoned, the panic displays the wrong message. Signed-off-by: Connor Tsui <[email protected]>
…kh726 Add lint against integer to pointer transmutes # `integer_to_ptr_transmutes` *warn-by-default* The `integer_to_ptr_transmutes` lint detects integer to pointer transmutes where the resulting pointers are undefined behavior to dereference. ### Example ```rust fn foo(a: usize) -> *const u8 { unsafe { std::mem::transmute::<usize, *const u8>(a) } } ``` ``` warning: transmuting an integer to a pointer creates a pointer without provenance --> a.rs:1:9 | 158 | std::mem::transmute::<usize, *const u8>(a) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this is dangerous because dereferencing the resulting pointer is undefined behavior = note: exposed provenance semantics can be used to create a pointer based on some previously exposed provenance = help: if you truly mean to create a pointer without provenance, use `std::ptr::without_provenance_mut` = help: for more information about transmute, see <https://doc.rust-lang.org/std/mem/fn.transmute.html#transmutation-between-pointers-and-integers> = help: for more information about exposed provenance, see <https://doc.rust-lang.org/std/ptr/index.html#exposed-provenance> = note: `#[warn(integer_to_ptr_transmutes)]` on by default help: use `std::ptr::with_exposed_provenance` instead to use a previously exposed provenance | 158 - std::mem::transmute::<usize, *const u8>(a) 158 + std::ptr::with_exposed_provenance::<u8>(a) | ``` ### Explanation Any attempt to use the resulting pointers are undefined behavior as the resulting pointers won't have any provenance. Alternatively, `std::ptr::with_exposed_provenance` should be used, as they do not carry the provenance requirement or if the wanting to create pointers without provenance `std::ptr::without_provenance_mut` should be used. See [std::mem::transmute] in the reference for more details. [std::mem::transmute]: https://doc.rust-lang.org/std/mem/fn.transmute.html -------- People are getting tripped up on this, see rust-lang#128409 and rust-lang#141220. There are >90 cases like these on [GitHub search](https://github.com/search?q=lang%3Arust+%2Ftransmute%3A%3A%3Cu%5B0-9%5D*.*%2C+%5C*const%2F&type=code). Fixes rust-lang/rust-clippy#13140 Fixes rust-lang#141220 Fixes rust-lang#145523 `@rustbot` labels +I-lang-nominated +T-lang cc `@traviscross` r? compiler
…r=Amanieu Fix `LazyLock` poison panic message Fixes the issue raised in rust-lang#144872 (comment) r? ```@Amanieu```
rustc-dev-guide subtree update Subtree update of `rustc-dev-guide` to rust-lang/rustc-dev-guide@c221508. Created using https://github.com/rust-lang/josh-sync. r? ```@ghost```
…, r=lqd Use unnamed lifetime spans as primary spans for `MISMATCHED_LIFETIME_SYNTAXES` Fixes rust-lang#145772 This PR changes the primary span(s) of the `MISMATCHED_LIFETIME_SYNTAXES` to point to the *unnamed* lifetime spans in both the inputs and *outputs* of the function signature. As reported in rust-lang#145772, this should make it so that IDEs highlight the spans of the actionable part of this lint, rather than just the (possibly named) input spans like they do today. This could be tweaked further perhaps, for example for `fn foo(_: T<'_>) -> T`, we don't need to highlight the elided lifetime if the actionable part is to change only the return type to `T<'_>`, but I think it's improvement on what's here today, so I think that should be follow-up since I think the logic might get a bit hairy. cc ```@shepmaster```
std/src/lib.rs: mention "search button" instead of "search bar" r? ```@GuillaumeGomez```
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: f6d23413c3 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing f6d2341 (parent) -> 4eedad3 (this PR) Test differencesShow 91 test diffsStage 1
Stage 2
Additionally, 84 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 4eedad312695d773b6e2e17a4f8082660470c101 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Finished benchmarking commit (4eedad3): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 4.2%, secondary -2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -4.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 468.54s -> 467.477s (-0.23%) |
Successful merges:
LazyLock
poison panic message #145307 (FixLazyLock
poison panic message)MISMATCHED_LIFETIME_SYNTAXES
#145798 (Use unnamed lifetime spans as primary spans forMISMATCHED_LIFETIME_SYNTAXES
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup