about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-20Rollup merge of #139357 - miried:master, r=AmanieuJacob Pratt-3/+12
Fix parameter order for `_by()` variants of `min` / `max`/ `minmax` in `std::cmp` We saw a regression introduced in version `1.86` that seems to be coming from switching the order of `v1` and `v2` when calling `comparison` functions in `min_by` / `max_by` / `minmax_by` (cf. this PR: https://github.com/rust-lang/rust/pull/136307) When the `compare` function is not symmetric in the arguments, this leads to false results. Apparently, the test cases do not cover this scenario currently. While asymmetric comparison may be an edge case, but current behavior is unexpected nevertheless.
2025-08-20Merge pull request #20483 from lumiscosity/optimize-iconLaurențiu Nicola-0/+0
Optimize editor plugin icon
2025-08-19Auto merge of #145601 - jieyouxu:rollup-t5mbqhc, r=jieyouxubors-133/+127
Rollup of 10 pull requests Successful merges: - rust-lang/rust#145538 (bufreader::Buffer::backshift: don't move the uninit bytes) - rust-lang/rust#145542 (triagebot: Don't warn no-mentions on subtree updates) - rust-lang/rust#145549 (Update rust maintainers in openharmony.md) - rust-lang/rust#145550 (Avoid using `()` in `derive(From)` output.) - rust-lang/rust#145556 (Allow stability attributes on extern crates) - rust-lang/rust#145560 (Remove unused `PartialOrd`/`Ord` from bootstrap) - rust-lang/rust#145568 (ignore frontmatters in `TokenStream::new`) - rust-lang/rust#145571 (remove myself from some adhoc-groups and pings) - rust-lang/rust#145576 (Add change tracker entry for `--timings`) - rust-lang/rust#145578 (Add VEXos "linked files" support to `armv7a-vex-v5`) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-19Tweak wording againQuinn Tucker-1/+1
2025-08-19Fix some typosStefan Schindler-4/+4
2025-08-19Merge pull request #2524 from rust-lang/offload-deviceManuel Drehwald-28/+114
add gpu device side instructions
2025-08-19add gpu device side instructionsManuel Drehwald-28/+114
2025-08-20make `prefetch` intrinsics safeFolkert de Vries-72/+70
2025-08-19Fix some doc typosStefan Schindler-2/+2
2025-08-19Add snapshot tests for stage 3 compiler buildsJakub Beránek-0/+76
2025-08-19Adjust wording for concisenessQuinn Tucker-2/+2
2025-08-19Fix typos in LocalKey documentationQuinn Tucker-2/+2
2025-08-19Enable triagebot `[review-changes-since]` featureUrgau-0/+3
2025-08-19Defer tail call ret ty equality to check_tail_callsMichael Goulet-25/+61
2025-08-19bless tests with new lint messagesKarol Zwolak-1/+1
2025-08-19bless tests with new lint messagesKarol Zwolak-344/+344
2025-08-19mention lint group in default level lint noteKarol Zwolak-6/+99
2025-08-19Auto merge of #145600 - jieyouxu:rollup-jw0bpnt, r=jieyouxubors-727/+1092
Rollup of 15 pull requests Successful merges: - rust-lang/rust#145338 (actually provide the correct args to coroutine witnesses) - rust-lang/rust#145429 (Couple of codegen_fn_attrs improvements) - rust-lang/rust#145452 (Do not strip binaries in bootstrap everytime if they are unchanged) - rust-lang/rust#145464 (Stabilize `const_pathbuf_osstring_new` feature) - rust-lang/rust#145474 (Properly recover from parenthesized use-bounds (precise capturing lists) plus small cleanups) - rust-lang/rust#145486 (Fix `unicode_data.rs` mention message) - rust-lang/rust#145490 (Trace some basic I/O operations in bootstrap) - rust-lang/rust#145493 (remove `should_render` in `PrintAttribute` derive) - rust-lang/rust#145500 (Port must_use to the new target checking) - rust-lang/rust#145505 (Simplify span caches) - rust-lang/rust#145510 (Visit and print async_fut local for async drop.) - rust-lang/rust#145511 (Rust build fails on OpenBSD after using file_lock feature) - rust-lang/rust#145532 (resolve: debug for block module) - rust-lang/rust#145533 (Reorder `lto` options from most to least optimizing) - rust-lang/rust#145537 (Do not consider a `T: !Sized` candidate to satisfy a `T: !MetaSized` obligation.) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-19Pretty print the name of an future from calling async closureMichael Goulet-4/+61
2025-08-19add a fallback implementation for the `prefetch_*` intrinsicsFolkert de Vries-8/+54
The fallback is to just ignore the arguments. That is a valid implementation because this intrinsic is just a hint. I also added `miri::intrinsic_fallback_is_spec` annotation, so that miri now supports these operations. A prefetch intrinsic call is valid on any pointer.
2025-08-19`ptr_arg`: clean-up a bitAda Alakbarova-31/+30
create `Option<Region>` in a separate `filter_map` reduces nesting a bit replace a bunch of `and_then`s with a clearer(?) let-chain `too_many_lines` no more! use free-standing `zip` add some comments
2025-08-19Remove the std workspace patch for `compiler-builtins`Trevor Gross-1/+0
All dependencies of `std` have dropped the crates.io dependency on `compiler-builtins`, so this patch is no longer needed. Closes: RUST-142265
2025-08-19Update lockfile for changes to `std_detect`Josh Triplett-2/+2
2025-08-19`std_detect`: Use `rustc-std-workspace-*` to pull in `compiler-builtins`Josh Triplett-2/+2
https://github.com/rust-lang/rust/pull/145489 changed `std_detect` to no longer depend on `cfg-if`, which meant it no longer indirectly pulled in `rustc-std-workspace-core` via `cfg-if`. That caused it to no longer depend on `compiler-builtins`. Change `std_detect` to use `rustc-std-workspace-core` and `rustc-std-workspace-alloc`, to integrate with the rustc workspace. This also pulls in `compiler-builtins` via `rustc-std-workspace-core`. Closes: https://github.com/rust-lang/rust/issues/145594
2025-08-19extract `duplicate_underscore_argument`, and move it into `functions`Ada Alakbarova-58/+73
misc: use `str::starts_with` extract `duplicate_underscore_argument` into a module move it to `functions`
2025-08-19Fix doc of `std::os::windows::io::BorrowedSocket::borrow_raw`Lorenz Leutgeb-1/+1
A small oversight in 0cb69dec57f I noticed while reading.
2025-08-19Use `ToString` specialization macro also for `Cow` and `String`Tobias Bucher-16/+2
2025-08-19Simplify macro generating `ToString` implementations for `&…&str`Tobias Bucher-34/+21
Use deref coercion to let the compiler remove any amount of references.
2025-08-19Merge pull request #4414 from bjorn3/weak_defsRalf Jung-28/+114
Support weak definitions
2025-08-19Support weak definitionsbjorn3-28/+114
When a symbol only has a weak definition, this definition will be picked. When a symbol has both a weak and a regular definition, the regular definition will be picked instead.
2025-08-19Auto merge of #145599 - jieyouxu:rollup-523cxhm, r=jieyouxubors-550/+1121
Rollup of 15 pull requests Successful merges: - rust-lang/rust#139345 (Extend `QueryStability` to handle `IntoIterator` implementations) - rust-lang/rust#140740 (Add `-Zindirect-branch-cs-prefix`) - rust-lang/rust#142079 (nll-relate: improve hr opaque types support) - rust-lang/rust#142938 (implement std::fs::set_permissions_nofollow on unix) - rust-lang/rust#143730 (fmt of non-decimal radix untangled) - rust-lang/rust#144767 (Correct some grammar in integer documentation) - rust-lang/rust#144906 (Require approval from t-infra instead of t-release on tier bumps) - rust-lang/rust#144983 (Rehome 37 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`) - rust-lang/rust#145025 (run spellcheck as a tidy extra check in ci) - rust-lang/rust#145099 (rustc_target: Add the `32s` target feature for LoongArch) - rust-lang/rust#145166 (suggest using `pub(crate)` for E0364) - rust-lang/rust#145255 (dec2flt: Provide more valid inputs examples) - rust-lang/rust#145306 (Add tracing to various miscellaneous functions) - rust-lang/rust#145336 (Hide docs for `core::unicode`) - rust-lang/rust#145585 (Miri: fix handling of in-place argument and return place handling) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-19Merge pull request #4530 from JoJoDeveloping/tb-doc-ugc-linkRalf Jung-1/+55
link to TB doc in unsafe-code-guidelines
2025-08-19Gate static coroutines behind a parser featureMichael Goulet-24/+67
2025-08-19Strenghten rustdoc js tester file macthing regexGuillaume Gomez-1/+1
2025-08-19Fix bug where `rustdoc-js` tester would not pick the right `search.js` file ↵Guillaume Gomez-2/+20
if there is more than one
2025-08-19God bless the testsJohannes Hostert-0/+53
2025-08-19link to TB doc in unsafe-code-guidelinesJohannes Hostert-1/+2
2025-08-19Prevent impossible combinations in `ast::ModKind`.Nicholas Nethercote-4/+4
`ModKind::Loaded` has an `inline` field and a `had_parse_error` field. If the `inline` field is `Inline::Yes` then `had_parse_error` must be `Ok(())`. This commit moves the `had_parse_error` field into the `Inline::No` variant. This makes it impossible to create the nonsensical combination of `inline == Inline::Yes` and `had_parse_error = Err(_)`.
2025-08-19Prevent impossible combinations in `ast::ModKind`.Nicholas Nethercote-25/+28
`ModKind::Loaded` has an `inline` field and a `had_parse_error` field. If the `inline` field is `Inline::Yes` then `had_parse_error` must be `Ok(())`. This commit moves the `had_parse_error` field into the `Inline::No` variant. This makes it impossible to create the nonsensical combination of `inline == Inline::Yes` and `had_parse_error = Err(_)`.
2025-08-19Rollup merge of #145578 - vexide:armv7a-vex-v5+linked-files, r=davidtwco许杰友 Jieyou Xu (Joe)-10/+26
Add VEXos "linked files" support to `armv7a-vex-v5` Third-party programs running on the VEX V5 platform need a linker script to ensure code and data are always placed in the allowed range `0x3800000-0x8000000` which is read/write/execute. However, developers can also configure the operating system (VEXos) to preload a separate file at any location between these two addresses before the program starts (as a sort of basic linking or configuration loading system). Programs have to know about this at compile time - in the linker script - to avoid placing data in a spot that overlaps where the linked file will be loaded. This is a very popular feature with existing V5 runtimes because it can be used to modify a program's behavior without re-uploading the entire binary to the robot controller. It's important for Rust to support this because while VEXos's runtime user-exposed file system APIs may only read data from an external SD card, linked files are allowed to load data directly from the device's onboard storage. This PR adds the `__linked_file_start` symbol to the existing VEX V5 linker script which can be used to shrink the stack and heap so that they do not overlap with a memory region containing a linked file. It expects the linked file to be loaded in the final N bytes of user RAM (this is not technically required but every existing runtime does it this way to avoid having discontinuous memory regions). With these changes, a developer targeting VEX V5 might add a second linker script to their project by specifying `-Clink-arg=-Tcustom.ld` and creating the file `custom.ld` to configure their custom memory layout. The linker would prepend this to the builtin target linker script. ```c /* custom.ld: Reserves 10MiB for a linked file. */ /* (0x7600000-0x8000000) */ __linked_file_length = 10M; /* The above line is equivalent to -Clink-arg=--defsym=__linked_file_length=10M */ /* Optional: specify one or more sections that */ /* represent the developer's custom format. */ SECTIONS { .linked_file_metadata (NOLOAD) : { __linked_file_metadata_start = .; . += 1M; __linked_file_metadata_end = .; } .linked_file_data (NOLOAD) : { __linked_file_data_start = .; . += 9M; __linked_file_data_end = .; } } INSERT AFTER .stack; ``` Then, using an external tool like the `vex-v5-serial` crate, they would configure the metadata of their uploaded program to specify the path of their linked file and the address where it should be loaded into memory (in the above example, `0x7600000`).
2025-08-19Rollup merge of #145576 - jieyouxu:bootstrap-timings, r=Kobzol许杰友 Jieyou Xu (Joe)-0/+5
Add change tracker entry for `--timings` Follow-up to rust-lang/rust#145379. Forgor when reviewing. r? `@Kobzol`
2025-08-19Rollup merge of #145571 - davidtwco:davidtwco-remove-from-groups, r=lqd许杰友 Jieyou Xu (Joe)-2/+1
remove myself from some adhoc-groups and pings Removing myself from some adhoc-groups related to the MIR as its been quite a while since I've worked in that area
2025-08-19Rollup merge of #145568 - fee1-dead-contrib:push-uvsonuzxmkus, r=fmease许杰友 Jieyou Xu (Joe)-8/+18
ignore frontmatters in `TokenStream::new` Fixes rust-lang/rust#145520 for now, we'd likely want to figure the stripping part later, so I noted it down on the list on the tracking issue. cc `@fmease`
2025-08-19Rollup merge of #145560 - Kobzol:bootstrap-remove-ord, r=jieyouxu许杰友 Jieyou Xu (Joe)-34/+34
Remove unused `PartialOrd`/`Ord` from bootstrap It was just wasting compile-time. There is one remaining "old" bootstrap test that uses the `Ord` impl on one test step, I'll remove that later.
2025-08-19Rollup merge of #145556 - JonathanBrouwer:extern-crate-stable, r=jdonszelmann许杰友 Jieyou Xu (Joe)-0/+1
Allow stability attributes on extern crates Fixes https://github.com/rust-lang/rust/issues/145497 r? ``@jdonszelmann``
2025-08-19Rollup merge of #145550 - nnethercote:derive_from-no-unit, r=Kobzol许杰友 Jieyou Xu (Joe)-77/+38
Avoid using `()` in `derive(From)` output. Using an error type instead of `()` avoids the duplicated errors on `struct SUnsizedField` in `deriving-from-wrong-target.rs`. It also improves the expanded output from this: ``` struct S2(u32, u32); impl ::core::convert::From<()> for S2 { #[inline] fn from(value: ()) -> S2 { (/*ERROR*/) } } ``` to this: ``` struct S2(u32, u32); impl ::core::convert::From<(/*ERROR*/)> for S2 { #[inline] fn from(value: (/*ERROR*/)) -> S2 { (/*ERROR*/) } } ``` The new code also only matchs on `item.kind` once. r? ``@Kobzol``
2025-08-19Rollup merge of #145549 - huaihuaidelulu:patch-2, r=Amanieu,jieyouxu许杰友 Jieyou Xu (Joe)-1/+1
Update rust maintainers in openharmony.md
2025-08-19Rollup merge of #145542 - blyxyas:no-mentions-subtree, r=Urgau许杰友 Jieyou Xu (Joe)-0/+2
triagebot: Don't warn no-mentions on subtree updates Complement to https://github.com/rust-lang/triagebot/pull/2137 r? ``@Urgau``
2025-08-19Rollup merge of #145538 - lolbinarycat:std-bufreader-buffer-backshift-less, ↵许杰友 Jieyou Xu (Joe)-1/+1
r=tgross35 bufreader::Buffer::backshift: don't move the uninit bytes previous code was perfectly sound because of MaybeUninit, but it did waste cycles on copying memory that is known to be uninitialized.
2025-08-19Rollup merge of #145537 - zachs18:metasized-negative-bound-fix, r=davidtwco许杰友 Jieyou Xu (Joe)-7/+117
Do not consider a `T: !Sized` candidate to satisfy a `T: !MetaSized` obligation. This example should fail to compile (and does under this PR, with the old and new solvers), but currently compiles successfully ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=6e0e5d0ae0cdf0571dea97938fb4a86d)), because (IIUC) the old solver's `lazily_elaborate_sizedness_candidate`/callers and the new solver's `TraitPredicate::fast_reject_assumption`/`match_assumption` consider a `T: _ Sized` candidate to satisfy a `T: _ MetaSized` obligation, for either polarity `_`, when that should only hold for positive polarity. ```rs #![feature(negative_bounds)] #![feature(sized_hierarchy)] use std::marker::MetaSized; fn foo<T: !MetaSized>() {} fn bar<T: !Sized + MetaSized>() { foo::<T>(); //~^ ERROR the trait bound `T: !MetaSized` is not satisfied // error under this PR } ``` Only observable with the internal-only `feature(negative_bounds)`, so might just be "wontfix". This example is added as a test in this PR (as well as testing that `foo<()>` and `foo<str>` are disallowed for `fn foo<T: !MetaSized`). cc `@davidtwco` for `feature(sized_hierarchy)` Maybe similar to 91c53c9 from <https://github.com/rust-lang/rust/pull/143307>