about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-11-14Auto merge of #133026 - workingjubilee:rollup-q8ig6ah, r=workingjubileebors-1321/+1910
Rollup of 7 pull requests Successful merges: - #131304 (float types: move copysign, abs, signum to libcore) - #132907 (Change intrinsic declarations to new style) - #132971 (Handle infer vars in anon consts on stable) - #133003 (Make `CloneToUninit` dyn-compatible) - #133004 (btree: simplify the backdoor between set and map) - #133008 (update outdated comment about test-float-parse) - #133012 (Add test cases for #125918) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-13Rollup merge of #133012 - Eclips4:issue-125670, r=compiler-errorsJubilee-0/+124
Add test cases for #125918 Closes #125670 r? `@jieyouxu`
2024-11-13Rollup merge of #133008 - onur-ozkan:update-outdated-comment, r=jieyouxuJubilee-1/+1
update outdated comment about test-float-parse It's no longer a Python program since https://github.com/rust-lang/rust/pull/127510.
2024-11-13Rollup merge of #133004 - cuviper:unrecover-btree, r=ibraheemdevJubilee-48/+11
btree: simplify the backdoor between set and map The internal `btree::Recover` trait acted as a private API between `BTreeSet` and `BTreeMap`, but we can use `pub(_)` restrictions these days, and some of the methods don't need special handling anymore. * `BTreeSet::get` can use `BTreeMap::get_key_value` * `BTreeSet::take` can use `BTreeMap::remove_entry` * `BTreeSet::replace` does need help, but this now uses a `pub(super)` method on `BTreeMap` instead of the trait. * `btree::Recover` is now removed.
2024-11-13Rollup merge of #133003 - zachs18:clonetouninit-dyn-compat-u8, r=dtolnayJubilee-44/+45
Make `CloneToUninit` dyn-compatible Make `CloneToUninit` dyn-compatible, by making `clone_to_uninit`'s `dst` parameter `*mut u8` instead of `*mut Self`, so the method does not reference `Self` except in the `self` parameter and is thus dispatchable from a trait object. This allows, among other things, adding `CloneToUninit` as a supertrait bound for `trait Foo` to allow cloning `dyn Foo` in some containers. Currently, this means that `Rc::make_mut` and `Arc::make_mut` can work with `dyn Foo` where `trait Foo: CloneToUninit`. <details><summary>Example</summary> ```rs #![feature(clone_to_uninit)] use std::clone::CloneToUninit; use std::rc::Rc; use std::fmt::Debug; use std::borrow::BorrowMut; trait Foo: BorrowMut<u32> + CloneToUninit + Debug {} impl<T: BorrowMut<u32> + CloneToUninit + Debug> Foo for T {} fn main() { let foo: Rc<dyn Foo> = Rc::new(42_u32); let mut bar = foo.clone(); *Rc::make_mut(&mut bar).borrow_mut() = 37; dbg!(foo, bar); // 42, 37 } ``` </details> Eventually, `Box::<T>::clone` is planned to be converted to use `T::clone_to_uninit`, which when combined with this change, will allow cloning `Box<dyn Foo>` where `trait Foo: CloneToUninit` without any additional `unsafe` code for the author of `trait Foo`.[^1] This PR should have no stable side-effects, as `CloneToUninit` is unstable so cannot be mentioned on stable, and `CloneToUninit` is not used as a supertrait anywhere in the stdlib. This change removes some length checks that could only fail if library UB was already hit (e.g. calling `<[T]>::clone_to_uninit` with a too-small-length `dst` is library UB and was previously detected[^2]; since `dst` does not have a length anymore, this now cannot be detected[^3]). r? libs-api ----- I chose to make the parameter `*mut u8` instead of `*mut ()` because that might make it simpler to pass the result of `alloc` to `clone_to_uninit`, but `*mut ()` would also make sense, and any `*mut ConcreteType` would *work*. The original motivation for [using specifically `*mut ()`](https://github.com/rust-lang/rust/pull/116113#discussion_r1335303908) appears to be `std::ptr::from_raw_parts_mut`, but that now [takes `*mut impl Thin`](https://doc.rust-lang.org/nightly/std/ptr/fn.from_raw_parts.html) instead of `*mut ()`. I have another branch where the parameter is `*mut ()`, if that is preferred. It *could* also take something like `&mut [MaybeUninit<u8>]` to be dyn-compatible but still allow size-checking and in some cases safe writing, but this is already an `unsafe` API where misuse is UB, so I'm not sure how many guardrails it's worth adding here, and `&mut [MaybeUninit<u8>]` might be overly cumbersome to construct for callers compared to `*mut u8` [^1]: Note that `impl<T: CloneToUninit + ?Sized> Clone for Box` must be added before or at the same time as when `CloneToUninit` becomes stable, due to `Box` being `#[fundamental]`, as if there is any stable gap between the stabilization of `CloneToUninit` and `impl<T: CloneToUninit + ?Sized> Clone for Box`, then users could implement both `CloneToUninit for dyn LocalTrait` and separately `Clone for Box<dyn LocalTrait>` during that gap, and be broken by the introduction of `impl<T: CloneToUninit + ?Sized> Clone for Box`. [^2]: Using a `debug_assert_eq` in [`core::clone::uninit::CopySpec::clone_slice`](https://doc.rust-lang.org/nightly/src/core/clone/uninit.rs.html#28). [^3]: This PR just uses [the metadata (length) from `self`](https://github.com/zachs18/rust/blob/e0c1c8bc5058cd3f8831b235c5963ab89840b33b/library/core/src/clone.rs#L286) to construct the `*mut [T]` to pass to `CopySpec::clone_slice` in `<[T]>::clone_to_uninit`.
2024-11-13Rollup merge of #132971 - BoxyUwU:handle_infers_in_anon_consts, ↵Jubilee-9/+76
r=compiler-errors Handle infer vars in anon consts on stable Fixes #132955 Diagnostics will sometimes try to replace generic parameters with inference variables in failing goals. This means that if we have some failing goal with an array repeat expr count anon const in it, we will wind up with some `ty::ConstKind::Unevaluated(anon_const_def, [?x])` during diagnostics which will then ICE if we do not handle inference variables correctly on stable when normalizing type system consts. r? ```@compiler-errors```
2024-11-13Rollup merge of #132907 - BLANKatGITHUB:intrinsic, r=saethlinJubilee-805/+1279
Change intrinsic declarations to new style Pr is for issue #132735 This changes the first `extern "rust-intrinsic"` block to the new style. r? `@RalfJung`
2024-11-13Rollup merge of #131304 - RalfJung:float-core, r=tgross35Jubilee-414/+374
float types: move copysign, abs, signum to libcore These operations are explicitly specified to act "bitwise", i.e. they just act on the sign bit and do not even quiet signaling NaNs. We also list them as ["non-arithmetic operations"](https://doc.rust-lang.org/nightly/std/primitive.f32.html#nan-bit-patterns), and all the other non-arithmetic operations are in libcore. There's no reason to expect them to require any sort of runtime support, and from [these experiments](https://github.com/rust-lang/rust/issues/50145#issuecomment-997301250) it seems like LLVM indeed compiles them in a way that does not require any sort of runtime support. Nominating for `@rust-lang/libs-api` since this change takes immediate effect on stable. Part of https://github.com/rust-lang/rust/issues/50145.
2024-11-14Auto merge of #122770 - iximeow:ixi/int-formatting-optimization, ↵bors-4/+18
r=workingjubilee improve codegen of fmt_num to delete unreachable panic it seems LLVM doesn't realize that `curr` is always decremented at least once in either loop formatting characters of the input string by their appropriate radix, and so the later `&buf[curr..]` generates a check for out-of-bounds access and panic. this is unreachable in reality as even for `x == T::zero()` we'll produce at least the character `Self::digit(T::zero())`, yielding at least one character output, and `curr` will always be at least one below `buf.len()`. adjust `fmt_int` to make this fact more obvious to the compiler, which fortunately (or unfortunately) results in a measurable performance improvement for workloads heavy on formatting integers. in the program i'd noticed this in, you can see the `cmp $0x80,%rdi; ja 7c` here, which branches to a slice index fail helper: <img width="660" alt="before" src="https://github.com/rust-lang/rust/assets/4615790/ac482d54-21f8-494b-9c83-4beadc3ca0ef"> where after this change the function is broadly similar, but smaller, with one fewer registers updated in each pass through the loop in addition the never-taken `cmp/ja` being gone: <img width="646" alt="after" src="https://github.com/rust-lang/rust/assets/4615790/1bee1d76-b674-43ec-9b21-4587364563aa"> this represents a ~2-3% difference in runtime in my [admittedly comically i32-formatting-bound](https://github.com/athre0z/disas-bench/blob/master/bench/yaxpeax/src/main.rs#L58-L67) use case (printing x86 instructions, including i32 displacements and immediates) as measured on a ryzen 9 3950x. the impact on `<impl LowerHex for i8>::fmt` is both more dramatic and less impactful: it continues to have a loop that is evaluated at most twice, though the compiler doesn't know that to unroll it. the generated code there is identical to the impl for `i32`. there, the smaller loop body has less effect on runtime, and removing the never-taken slice bounds check is offset by whatever address recalculation is happening with the `lea/add/neg` at the end of the loop. it behaves about the same before and after. --- i initially measured slightly better outcomes using `unreachable_unchecked()` here instead, but that was hacking on std and rebuilding with `-Z build-std` on an older rustc (nightly 5b377cece, 2023-06-30). it does not yield better outcomes now, so i see no reason to proceed with that approach at all. <details> <summary>initial notes about that, seemingly irrelevant on modern rustc</summary> i went through a few tries at getting llvm to understand the bounds check isn't necessary, but i should mention the _best_ i'd seen here was actually from the existing `fmt_int` with a diff like ```diff if x == zero { // No more digits left to accumulate. break; }; } } + + if curr >= buf.len() { + unsafe { core::hint::unreachable_unchecked(); } + } let buf = &buf[curr..]; ``` posting a random PR to `rust-lang/rust` to do that without a really really compelling reason seemed a bit absurd, so i tried to work that into something that seems more palatable at a glance. but if you're interested, that certainly produced better (x86_64) code through LLVM. in that case with `buf.iter_mut().rev()` as the iterator, `<impl LowerHex for i8>::fmt` actually unrolls into something like ``` put_char(x & 0xf); let mut len = 1; if x > 0xf { put_char((x >> 4) & 0xf); len = 2; } pad_integral(buf[buf.len() - len..]); ``` it's pretty cool! `<impl LowerHex for i32>::fmt` also was slightly better. that all resulted in closer to an 6% difference in my use case. </details> --- i have not looked at formatters other than LowerHex/UpperHex with this change, though i'd be a bit shocked if any were _worse_. (i have absolutely _no_ idea how you'd regression test this, but that might be just my not knowing what the right tool for that would be in rust-lang/rust. i'm of half a mind that this is small and fiddly enough to not be worth landing lest it quietly regress in the future anyway. but i didn't want to discard the idea without at least offering it upstream here)
2024-11-14Auto merge of #133006 - matthiaskrgr:rollup-dz6oiq5, r=matthiaskrgrbors-184/+414
Rollup of 8 pull requests Successful merges: - #126046 (Implement `mixed_integer_ops_unsigned_sub`) - #132302 (rustdoc: Treat declarative macros more like other item kinds) - #132842 (ABI checks: add support for tier2 arches) - #132995 (compiletest: Add ``exact-llvm-major-version`` directive) - #132996 (Trim extra space when suggesting removing bad `let`) - #132998 (Unvacation myself) - #133000 ([rustdoc] Fix duplicated footnote IDs) - #133001 (actually test next solver) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-13Add test casesKirill Podoprigora-0/+124
2024-11-13update outdated comment about test-float-parseonur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-13Rollup merge of #133001 - lcnr:test-next-solver, r=compiler-errorsMatthias Krüger-1/+15
actually test next solver uwu r? `@compiler-errors`
2024-11-13Rollup merge of #133000 - GuillaumeGomez:footnote-ids, r=notriddleMatthias Krüger-32/+92
[rustdoc] Fix duplicated footnote IDs Fixes https://github.com/rust-lang/rust/issues/131901. Footnote IDs were increased locally (ie, on the docblock) and not globally (ie, on the whole item page). cc `@aDotInTheVoid` r? `@notriddle`
2024-11-13Rollup merge of #132998 - jieyouxu:undo-vacation, r=jieyouxuMatthias Krüger-1/+0
Unvacation myself r? `@ghost`
2024-11-13Rollup merge of #132996 - clubby789:unn-let-space, r=jieyouxuMatthias Krüger-5/+7
Trim extra space when suggesting removing bad `let` Fixes #132969
2024-11-13Rollup merge of #132995 - Eclips4:issue-132348, r=jieyouxuMatthias Krüger-2/+30
compiletest: Add ``exact-llvm-major-version`` directive Now contributors don't need to use `min-llvm-version: X` + `ignore-llvm-version: X+1 - 99`, so they can simply use `exact-llvm-major-version: X` To be honest, I didn't find any usages of that hack other than the one mentioned in the issue. ( `tests/codegen/try_question_mark_nop.rs`) Closes #132348. rustc-dev-guide PR for `//@ exact-llvm-major-version`: https://github.com/rust-lang/rustc-dev-guide/pull/2135 r? jieyouxu
2024-11-13Rollup merge of #132842 - veluca93:abi-checks-tier2, r=workingjubileeMatthias Krüger-41/+136
ABI checks: add support for tier2 arches See #131800 for the data collection behind this change. r? RalfJung
2024-11-13Rollup merge of #132302 - fmease:rustdoc-better-vis-for-macro-decl, r=notriddleMatthias Krüger-102/+31
rustdoc: Treat declarative macros more like other item kinds Apparently at some time in the past we were unable to generate an href for the module path inside the visibility of decl macros 2.0 (`pub(in ...)`). As a result of this, a whole separate function was introduced specifically for printing the visibility of decl macros that didn't attempt to generate any links. The description of PR https://github.com/rust-lang/rust/pull/84074 states: > This fixes the overly-complex invariant mentioned in https://github.com/rust-lang/rust/pull/83237#issuecomment-815346570, where the macro source can't have any links in it only because the cache hasn't been populated yet. I can no longer reproduce the original issue. Reusing the existing visibility rendering logic *seems* to work just fine (I couldn't come up with any counterexamples, though I invite you to prove me wrong). * Fixes #83000 * Fixes the visibility showing up "twice" in rustdoc-JSON output: Once as the `visibility` field, once baked into the source[^1] * Fixes `#[doc(hidden)]` not getting rendered on doc(hidden) decl macros 2.0 under `--document-hiden-items` (for decl macros 1.2 the issue remains; I will address this separately when fixing #132304). --- <details><summary>Outdated Section</summary> NOTE: The current version of this PR is committing a UI crime, I'd like to receive feedback on that. Maybe you have a satisfactory solution for how to remedy it. Namely, as you know we have two different ways of / modes for highlighting code with color: 1. Only highlighting links / item paths and avoiding to highlight tokens by kind like keywords (to reduce visual noise and maybe also artifact size). Used for item declarations(\*). 2. Highlighting tokens by kind. Used for code blocks written by the user. (\*): With the notable exception being macro declarations! Well, since this PR reuses the same function for rendering the item visibility (which only makes sense), we have a clash of modes: We now use both ways of highlighting code for decl macros: №1 for the visibility, №2 for the rest. This awkward. See for yourself: * On master: ![Screenshot 2024-10-29 at 03-37-48 by_example_vis_named in decl_macro a b c - Rust](https://github.com/user-attachments/assets/22f0ab6e-9ba9-4c4e-8fb0-0741c91d360b) * On this branch: ![Screenshot 2024-10-29 at 03-36-41 by_example_vis_named in decl_macro a b c - Rust](https://github.com/user-attachments/assets/b11d81a3-3e2e-43cb-a5b8-6773a3048732) </details> Furthermore, we now no longer syntax-highlight declarative macros (be it `macro_rules!` or `macro`) since that was inconsistent with the way we render all other item kinds. See (collapsed) *Outdated Section* above. See also https://github.com/rust-lang/rust/pull/132302#discussion_r1821310783. | On master | On this branch | |---|---| | ![Screenshot 2024-11-13 at 16-12-46 by_example_vis_named in decl_macro a b c - Rust](https://github.com/user-attachments/assets/cb3aeb42-a56d-4ced-80d9-f2694f369af1) | ![Screenshot 2024-11-13 at 16-13-22 by_example_vis_named in decl_macro a b c - Rust](https://github.com/user-attachments/assets/b73bee50-1b85-4862-afba-5ad471443ccc) | [^1]: E.g., `"visibility":{"restricted":{"parent":1,"path":"::a"}},/*OMITTED*/,"inner":{"macro":"pub(in a) macro by_example_vis_named($foo:expr) {\n ...\n}"}`
2024-11-13Rollup merge of #126046 - davidzeng0:mixed_integer_ops_unsigned_sub, r=AmanieuMatthias Krüger-0/+103
Implement `mixed_integer_ops_unsigned_sub` Implement https://github.com/rust-lang/rust/issues/126043 ACP: https://github.com/rust-lang/libs-team/issues/386 [Accepted]
2024-11-13Auto merge of #132662 - RalfJung:const-panic-inlining, r=tgross35bors-10/+34
tweak attributes for const panic macro Let's do some random mutations of this macro to see if that can re-gain the perf lost in https://github.com/rust-lang/rust/pull/132542.
2024-11-13Update core CloneToUninit testsZachary S-6/+6
2024-11-13btree: simplify the backdoor between set and mapJosh Stone-48/+11
The internal `btree::Recover` trait acted as a private API between `BTreeSet` and `BTreeMap`, but we can use `pub(_)` restrictions these days, and some of the methods don't need special handling anymore. * `BTreeSet::get` can use `BTreeMap::get_key_value` * `BTreeSet::take` can use `BTreeMap::remove_entry` * `BTreeSet::replace` does need help, but this now uses a `pub(super)` method on `BTreeMap` instead of the trait. * `btree::Recover` is now removed.
2024-11-13Delete tests/codegen/fmt_int_no_panic.rsiximeow-24/+0
this test was included for demonstrative and discussion purposes but does not test what its name alleges - in fact it does not test much of value at all! as mentioned in this comment, https://github.com/rust-lang/rust/pull/122770#issuecomment-2474256965 , writing a correct test for this codegen outcome is difficult (partially because the public interface to std::fmt intentionally includes an #[inline(never)] function!), so to test this correctly will require more than i can offer in 122770.
2024-11-13actually test next solverlcnr-1/+15
2024-11-13Add regression test for #131901Guillaume Gomez-0/+41
2024-11-13Fix duplicated footnote IDsGuillaume Gomez-32/+51
2024-11-13rustdoc: Treat decl macros like other itemsLeón Orell Valerian Liehr-102/+31
2024-11-13Unvacation许杰友 Jieyou Xu (Joe)-1/+0
2024-11-13Address reviewKirill Podoprigora-3/+9
2024-11-13Trim extra space when suggesting removing bad `let`clubby789-5/+7
2024-11-13Add ``exact-llvm-major-version`` directiveKirill Podoprigora-2/+24
2024-11-13Auto merge of #132556 - clubby789:cargo-update, r=Mark-Simulacrumbors-425/+366
Add licenses + run `cargo update` Replaces #131311 ``` compiler & tools dependencies: Locking 86 packages to latest compatible versions Updating anstream v0.6.15 -> v0.6.17 Updating anstyle v1.0.8 -> v1.0.10 Updating anstyle-lossy v1.1.2 -> v1.1.3 Updating anstyle-parse v0.2.5 -> v0.2.6 Updating anstyle-query v1.1.1 -> v1.1.2 Updating anstyle-svg v0.1.5 -> v0.1.7 Updating anstyle-wincon v3.0.4 -> v3.0.6 Updating anyhow v1.0.89 -> v1.0.92 Updating arrayref v0.3.7 -> v0.3.9 Updating blake3 v1.5.2 -> v1.5.4 Updating bytes v1.7.2 -> v1.8.0 Updating cc v1.1.23 -> v1.1.34 Updating clap v4.5.18 -> v4.5.20 Updating clap_builder v4.5.18 -> v4.5.20 Updating clap_complete v4.5.29 -> v4.5.36 Updating colorchoice v1.0.2 -> v1.0.3 Updating constant_time_eq v0.3.0 -> v0.3.1 Updating curl v0.4.46 -> v0.4.47 Updating curl-sys v0.4.76+curl-8.10.1 -> v0.4.77+curl-8.10.1 Updating derive_builder v0.20.1 -> v0.20.2 Updating derive_builder_core v0.20.1 -> v0.20.2 Updating derive_builder_macro v0.20.1 -> v0.20.2 Adding foldhash v0.1.3 Updating futures v0.3.30 -> v0.3.31 Updating futures-channel v0.3.30 -> v0.3.31 Updating futures-core v0.3.30 -> v0.3.31 Updating futures-executor v0.3.30 -> v0.3.31 Updating futures-io v0.3.30 -> v0.3.31 Updating futures-macro v0.3.30 -> v0.3.31 Updating futures-sink v0.3.30 -> v0.3.31 Updating futures-task v0.3.30 -> v0.3.31 Updating futures-util v0.3.30 -> v0.3.31 Updating gimli v0.31.0 -> v0.31.1 Adding hashbrown v0.15.0 Updating indexmap v2.5.0 -> v2.6.0 Updating js-sys v0.3.70 -> v0.3.72 Updating libc v0.2.159 -> v0.2.161 Updating libm v0.2.8 -> v0.2.11 Updating object v0.36.4 -> v0.36.5 Updating once_cell v1.19.0 -> v1.20.2 Removing once_map v0.4.19 Updating openssl-sys v0.9.103 -> v0.9.104 Updating pathdiff v0.2.1 -> v0.2.2 Updating pest v2.7.13 -> v2.7.14 Updating pest_derive v2.7.13 -> v2.7.14 Updating pest_generator v2.7.13 -> v2.7.14 Updating pest_meta v2.7.13 -> v2.7.14 Updating pin-project-lite v0.2.14 -> v0.2.15 Updating proc-macro2 v1.0.86 -> v1.0.89 Updating redox_syscall v0.5.6 -> v0.5.7 Updating regex v1.10.6 -> v1.11.1 Updating regex-automata v0.4.7 -> v0.4.8 Updating regex-syntax v0.8.4 -> v0.8.5 Updating rinja v0.3.4 -> v0.3.5 Updating rinja_derive v0.3.4 -> v0.3.5 Updating rinja_parser v0.3.4 -> v0.3.5 Updating rustix v0.38.37 -> v0.38.38 Updating rustversion v1.0.17 -> v1.0.18 Updating schannel v0.1.24 -> v0.1.26 Updating serde v1.0.210 -> v1.0.214 Updating serde_derive v1.0.210 -> v1.0.214 Updating serde_json v1.0.128 -> v1.0.132 Updating syn v2.0.79 -> v2.0.87 Updating tar v0.4.42 -> v0.4.43 Updating terminal_size v0.3.0 -> v0.4.0 Updating thiserror v1.0.64 -> v1.0.66 Updating thiserror-impl v1.0.64 -> v1.0.66 Updating tokio v1.40.0 -> v1.41.0 Updating ucd-trie v0.1.6 -> v0.1.7 Updating unicase v2.7.0 -> v2.8.0 Updating unicode-bidi v0.3.15 -> v0.3.17 Updating unicode-properties v0.1.2 -> v0.1.3 Updating uuid v1.10.0 -> v1.11.0 Updating wasi-preview1-component-adapter-provider v24.0.0 -> v24.0.1 (latest: v25.0.1) Updating wasm-bindgen v0.2.93 -> v0.2.95 Updating wasm-bindgen-backend v0.2.93 -> v0.2.95 Updating wasm-bindgen-macro v0.2.93 -> v0.2.95 Updating wasm-bindgen-macro-support v0.2.93 -> v0.2.95 Updating wasm-bindgen-shared v0.2.93 -> v0.2.95 Updating wasm-encoder v0.219.0 -> v0.219.1 Updating wasm-metadata v0.219.0 -> v0.219.1 Removing wasmparser v0.219.0 Adding wasmparser v0.218.0 (latest: v0.219.1) Adding wasmparser v0.219.1 Updating wast v219.0.0 -> v219.0.1 Updating wat v1.219.0 -> v1.219.1 Updating wit-component v0.219.0 -> v0.219.1 Updating wit-parser v0.219.0 -> v0.219.1 library dependencies: Locking 5 packages to latest compatible versions Updating compiler_builtins v0.1.136 -> v0.1.138 Updating dlmalloc v0.2.6 -> v0.2.7 Updating object v0.36.4 -> v0.36.5 Updating windows-sys v0.52.0 -> v0.59.0 rustbook dependencies: Updating anstream v0.6.15 -> v0.6.17 Updating anstyle v1.0.8 -> v1.0.10 Updating anstyle-parse v0.2.5 -> v0.2.6 Updating anstyle-query v1.1.1 -> v1.1.2 Updating anstyle-wincon v3.0.4 -> v3.0.6 Updating anyhow v1.0.89 -> v1.0.92 Updating cc v1.1.22 -> v1.1.34 Updating clap v4.5.18 -> v4.5.20 Updating clap_builder v4.5.18 -> v4.5.20 Updating clap_complete v4.5.29 -> v4.5.36 Updating colorchoice v1.0.2 -> v1.0.3 Updating hashbrown v0.14.5 -> v0.15.0 Updating indexmap v2.5.0 -> v2.6.0 Updating js-sys v0.3.70 -> v0.3.72 Updating libc v0.2.159 -> v0.2.161 Updating once_cell v1.19.0 -> v1.20.2 Updating pathdiff v0.2.1 -> v0.2.2 Updating pest v2.7.13 -> v2.7.14 Updating pest_derive v2.7.13 -> v2.7.14 Updating pest_generator v2.7.13 -> v2.7.14 Updating pest_meta v2.7.13 -> v2.7.14 Updating proc-macro2 v1.0.86 -> v1.0.89 Updating redox_syscall v0.5.6 -> v0.5.7 Updating regex v1.10.6 -> v1.11.1 Updating regex-automata v0.4.7 -> v0.4.8 Updating regex-syntax v0.8.4 -> v0.8.5 Updating rustix v0.38.37 -> v0.38.38 Updating serde v1.0.210 -> v1.0.214 Updating serde_derive v1.0.210 -> v1.0.214 Updating serde_json v1.0.128 -> v1.0.132 Updating syn v2.0.79 -> v2.0.87 Updating terminal_size v0.3.0 -> v0.4.0 Updating thiserror v1.0.64 -> v1.0.66 Updating thiserror-impl v1.0.64 -> v1.0.66 Updating ucd-trie v0.1.6 -> v0.1.7 Updating unicase v2.7.0 -> v2.8.0 Updating unicode-bidi v0.3.15 -> v0.3.17 Updating wasm-bindgen v0.2.93 -> v0.2.95 Updating wasm-bindgen-backend v0.2.93 -> v0.2.95 Updating wasm-bindgen-macro v0.2.93 -> v0.2.95 Updating wasm-bindgen-macro-support v0.2.93 -> v0.2.95 Updating wasm-bindgen-shared v0.2.93 -> v0.2.95 Removing windows-sys v0.48.0 Removing windows-targets v0.48.5 Removing windows_aarch64_gnullvm v0.48.5 Removing windows_aarch64_msvc v0.48.5 Removing windows_i686_gnu v0.48.5 Removing windows_i686_msvc v0.48.5 Removing windows_x86_64_gnu v0.48.5 Removing windows_x86_64_gnullvm v0.48.5 Removing windows_x86_64_msvc v0.48.5 ```
2024-11-13Run `cargo update` and update licensesclubby789-425/+366
2024-11-13Auto merge of #132872 - onur-ozkan:reapply-132772, r=jieyouxubors-36/+44
Reland #132772: use `download-rustc="if-unchanged"` as a global default Relands https://github.com/rust-lang/rust/pull/132772 with the fix. r? jieyouxu (knows the context).
2024-11-13const_panic: don't wrap it in a separate functionRalf Jung-10/+34
2024-11-13Auto merge of #132886 - fmease:rustdoc-perf-clean-middle-args, r=GuillaumeGomezbors-25/+19
[perf] rustdoc: Perform less work when cleaning middle::ty parenthesized generic args CC #132697. I presume the perf regression it caused (if real) boils down to query invocation overhead, namely of `def_kind` & `trait_def` as we don't seem to be decoding more often from the crate metadata. I won't try the obvious and reduce the amount of query calls by threading information via params as that would render the code awkward. So instead I'm simply trying to attack some low-hanging fruits in the vicinity. --- Previously, we would `clean_middle_generic_args` *unconditionally* inside `clean_middle_generic_args_with_constraints` even though we didn't actually use its result for parenthesized generic args (`Trait(...) -> ...`). Now, we only call `clean_middle_generic_args` when necessary. Lastly, I've simplified `clean_middle_generic_args_with_constraints`. --- r? ghost
2024-11-13disable precompiled rustc for "library" and "compiler" profilesonur-ozkan-0/+2
There is an ongoing discussion about this on Zulip and for now we want to keep these disabled. Zulip thread: https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/.60download-rustc.20.3D.20'if-unchanged'.60.20for.20.60compiler.60.20profile.3F Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-13handle channel info before handling git infoonur-ozkan-6/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-13Reapply "Rollup merge of #132772 - onur-ozkan:download-rustc-default, ↵onur-ozkan-31/+34
r=jieyouxu" This reverts commit c0cee4e36b5f0964bdeb2ac12cfd9002addb51cc.
2024-11-13Auto merge of #132883 - LaihoE:vectorized_is_sorted, r=thomccbors-1/+17
vectorize slice::is_sorted Benchmarks using u32 slices: | len | New | Old | |--------|----------------------|----------------------| | 2 | 1.1997 ns | 889.23 ps | | 4 | 1.6479 ns | 1.5396 ns | | 8 | 2.5764 ns | 2.5633 ns | | 16 | 5.4750 ns | 4.7421 ns | | 32 | 11.344 ns | 8.4634 ns | | 64 | 12.105 ns | 18.104 ns | | 128 | 17.263 ns | 33.185 ns | | 256 | 29.465 ns | 60.928 ns | | 512 | 48.926 ns | 116.19 ns | | 1024 | 85.274 ns | 237.91 ns | | 2048 | 160.94 ns | 469.53 ns | | 4096 | 311.60 ns | 911.43 ns | | 8192 | 615.89 ns | 2.2316 µs | | 16384 | 1.2619 µs | 3.4871 µs | | 32768 | 2.5245 µs | 6.9947 µs | | 65536 | 5.2254 µs | 15.212 µs | Seems to be a bit slower on small N but much faster on large N. Godbolt: https://rust.godbolt.org/z/Txn5MdfKn
2024-11-13Auto merge of #132972 - matthiaskrgr:rollup-456osr7, r=matthiaskrgrbors-16/+68
Rollup of 7 pull requests Successful merges: - #132702 (CFI: Append debug location to CFI blocks) - #132851 (Update the doc comment of `ASCII_CASE_MASK`) - #132948 (stabilize const_unicode_case_lookup) - #132950 (Use GNU ld on m68k-unknown-linux-gnu) - #132962 (triagebot: add codegen reviewers) - #132966 (stabilize const_option_ext) - #132970 (Add tracking issue number to unsigned_nonzero_div_ceil feature) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-12Rollup merge of #132970 - tyilo:nonzero-u-div-ceil-issue, r=tgross35Matthias Krüger-1/+1
Add tracking issue number to unsigned_nonzero_div_ceil feature Tracking issue: #132968
2024-11-12Rollup merge of #132966 - RalfJung:const_option_ext, r=jhprattMatthias Krüger-6/+4
stabilize const_option_ext Fixes https://github.com/rust-lang/rust/issues/91930 FCP passed in that issue.
2024-11-12Rollup merge of #132962 - workingjubilee:add-codegen-reviewers, r=saethlinMatthias Krüger-1/+7
triagebot: add codegen reviewers Discussed with `@saethlin` off-sides
2024-11-12Rollup merge of #132950 - knickish:m68k_gnu_ld, r=workingjubileeMatthias Krüger-2/+9
Use GNU ld on m68k-unknown-linux-gnu LLD does not really support the M68k architecture yet, specify `m68k-linux-gnu-ld` as the linker for the platform
2024-11-12Rollup merge of #132948 - RalfJung:const_unicode_case_lookup, r=NoratriebMatthias Krüger-5/+10
stabilize const_unicode_case_lookup Fixes https://github.com/rust-lang/rust/issues/101400 See there for t-libs-api FCP
2024-11-12Rollup merge of #132851 - chansuke:update-comment, r=thomccMatthias Krüger-1/+1
Update the doc comment of `ASCII_CASE_MASK` Revived and continued the work from https://github.com/rust-lang/rust/pull/120282. the original [branch](https://github.com/mahmudsudo/rust-1/tree/patch-1) was deleted, i created a new branch to carry the changes forward
2024-11-12Rollup merge of #132702 - 1c3t3a:issue-132615, r=rcvalleMatthias Krüger-0/+36
CFI: Append debug location to CFI blocks Currently we're not appending debug locations to the inserted CFI blocks. This shows up in #132615 and #100783. This change fixes that by passing down the debug location to the CFI type-test generation and appending it to the blocks. Credits also belong to `@jakos-sec` who worked with me on this.
2024-11-12Auto merge of #132870 - Noratrieb:inline-int-parsing, r=tgross35bors-0/+3
`#[inline]` integer parsing functions This improves the performance of `str::parse` into integers. Before: ``` compare fastest │ slowest │ median │ mean │ samples │ iters ╰─ std │ │ │ │ │ ├─ 328920585 10.23 ns │ 24.8 ns │ 10.34 ns │ 10.48 ns │ 100 │ 25600 ├─ 3255 8.551 ns │ 8.59 ns │ 8.551 ns │ 8.56 ns │ 100 │ 25600 ╰─ 5 7.847 ns │ 7.887 ns │ 7.847 ns │ 7.853 ns │ 100 │ 25600 ``` After: ``` compare fastest │ slowest │ median │ mean │ samples │ iters ╰─ std │ │ │ │ │ ├─ 328920585 8.316 ns │ 23.7 ns │ 8.355 ns │ 8.491 ns │ 100 │ 25600 ├─ 3255 4.566 ns │ 4.588 ns │ 4.586 ns │ 4.576 ns │ 100 │ 51200 ╰─ 5 2.877 ns │ 3.697 ns │ 2.896 ns │ 2.945 ns │ 100 │ 102400 ``` Benchmark: ```rust fn std(input: &str) -> Result<u64, ParseIntError> { input.parse() } ```