about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-09reorganize rwlock fileConnor Tsui-327/+372
This commit is a purely cosmetic change to the documentation and ordering of items in the `rwlock.rs` file, which will help discern the actual difference between the `nonpoison` and `poison` variants of `rwlock`. List of changes (lots of small things): - Clean up some of the existing field doc comments - Add documentation for every field in struct definitions - Consolidate related implementation blocks (1 implementation block per guard instead of 2) - Use the lifetime name `'rwlock` instead of `'a` - Reorder implementation blocks to be consistent across the entire file (follows the order `ReadGuard`, `WriteGuard`, `MappedReadGuard`, MappedWriteGuard`) - Move simple trait implementations to the bottom of the file - Rename the `poison` field in `MappedRwLockWriteGuard` to posion_guard` - Cut off comments at 100 columns - Update the documentation of `downgrade` to match stabilization PR # 143191
2025-08-09rustc_target: Add the `32s` target feature for LoongArchWANG Rui-7/+14
2025-08-09Merge ref '4c7749e8c8e5' from rust-lang/rustThe Miri Cronjob Bot-15190/+19119
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 4c7749e8c8e50ad146da599eea3a250160c1bc2b Filtered ref: 9742b5940dcb4aea810f9ce020a92b3f72ed7bb4 This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-08Stop using uadd.with.overflowScott McMurray-23/+41
2025-08-09Prepare for merging from rust-lang/rustThe Miri Cronjob Bot-1/+1
This updates the rust-version file to 4c7749e8c8e50ad146da599eea3a250160c1bc2b.
2025-08-09extend download context and change functions to directly use thatbit-aloo-227/+130
2025-08-09Merge pull request #20411 from BenjaminBrienen/duplicate-fieldLaurențiu Nicola-1/+0
remove duplicate field in Debug impl of ProjectWorkspace
2025-08-09Rollup merge of #145134 - camsteffen:indirect-assoc-parent, r=cjgillotStuart Cook-8/+5
Reduce indirect assoc parent queries Simplify some code that uses multiple queries to get the parent of an associated item.
2025-08-09Rollup merge of #145132 - camsteffen:refactor-map-unit-fn, r=fee1-deadStuart Cook-68/+39
Refactor map_unit_fn lint Just some light refactoring.
2025-08-09Rollup merge of #145124 - compiler-errors:for-eq, r=lqdStuart Cook-22/+33
Recover `for PAT = EXPR {}` I type this constantly, and the existing suggestion to put `in` before the `=` is misleading.
2025-08-09Rollup merge of #145119 - makai410:pretty-fix, r=compiler-errorsStuart Cook-3/+3
rustc_public: fix missing parenthesis in pretty discriminant
2025-08-09Rollup merge of #145115 - lcnr:less-borrowck-tainting, r=compiler-errorsStuart Cook-101/+210
defer opaque type errors, generally greatly reduce tainting fixes the test for rust-lang/rust#135528, does not actually fix that issue properly. This is useful as it causes the migration to rust-lang/rust#139587 to be a lot easier.
2025-08-09Rollup merge of #145103 - fee1-dead-contrib:push-plompruwywvk, r=compiler-errorsStuart Cook-87/+1
rustc_metadata: remove unused private trait impls These are impls for non-reachable traits that don't appear to be used. Please let me know if there is value in keeping some of them for now. cc `@cjgillot`
2025-08-09Rollup merge of #145100 - GuillaumeGomez:rank-doc-alias-lower, r=lolbinarycatStuart Cook-0/+54
Rank doc aliases lower than equivalently matched items Follow-up of https://github.com/rust-lang/rust/pull/143988. cc `@lolbinarycat`
2025-08-09Rollup merge of #145097 - lcnr:type-foldable-yeet, r=wesleywiserStuart Cook-9/+3
remove unnecessary `TypeFoldable` impls
2025-08-09Rollup merge of #145096 - Spxg:w/wasm_atomic, r=tgross35Stuart Cook-0/+4
Fix wasm target build with atomics feature Introduced by https://github.com/rust-lang/rust/pull/115746 close https://github.com/rust-lang/rust/issues/145101
2025-08-09Rollup merge of #145083 - Kobzol:fix-cargo-cross-build, r=jieyouxuStuart Cook-2/+22
Fix cross-compilation of Cargo Regressed in https://github.com/rust-lang/rust/pull/144303. I guess this wasn't seen in other `ToolTarget` tools, because they are more dependent on the compiler and are ~always built together with other stuff that also built the std, while Cargo is relatively self-contained. Fixes: https://github.com/rust-lang/rust/issues/145059 r? ``@jieyouxu``
2025-08-09Rollup merge of #145082 - nnethercote:macro-stats-fix-widths, r=petrochenkovStuart Cook-6/+33
Fix some bad formatting in `-Zmacro-stats` output. r? `@petrochenkov`
2025-08-09Rollup merge of #145080 - ashivaram23:graphviz_escape, r=lqdStuart Cook-0/+1
Escape diff strings in MIR dataflow graphviz This uses `dot::escape_html` on diff strings so that `<` and `>` are properly escaped in MIR dataflow graphviz. Previously the output could be malformed. For example, the graphviz for borrow check `MaybeInitializedPlaces` for the example in rust-lang/rust#145032 contained an unescaped `Fork<'_>`.
2025-08-09Rollup merge of #145073 - ZuseZ4:autodiff-llvm-21, r=jieyouxuStuart Cook-0/+1
update enzyme submodule to handle llvm 21 This currently has a fix / workaround in our local rust-lang/Enzyme fork, which is needed to unblock a few people contributing to std::autodiff. It also permanently disables a component (BCLoader) which we shouldn't need on the rust side, hence saving a bit of compile time and disk space. Once upstream Enzyme (EnzymeAD/Enzyme) fixed llvm-21 support I'll probably make another pr to drop our local patch.
2025-08-09Rollup merge of #145050 - lcnr:add-opaque-type-tests, r=lqdStuart Cook-1/+101
add member constraints tests taken from rust-lang/rust#139587.
2025-08-09Rollup merge of #145027 - Kmeakin:km/optimize-char-is-alphanumeric, r=scottmcmStuart Cook-1/+5
Optimize `char::is_alphanumeric` Avoid an unnecessary call to `unicode::Alphabetic` when `self` is an ASCII digit (ie `0..=9`).
2025-08-09Rollup merge of #145017 - pmur:murp/s390x-improve-asm-test, r=nnethercoteStuart Cook-1/+1
Explicitly disable vector feature on s390x baseline of bad-reg test If the baseline s390x cpu is changed to a newer variant, such as z13, the vector feature may be enabled by default. When rust is packaged on fedora 38 and newer, it is set to z13. Explicitly disable vector support on the baseline test for consistent results across s390x cpus.
2025-08-09Rollup merge of #145010 - bjorn3:couple_abi_cleanups, r=compiler-errorsStuart Cook-20/+16
Couple of minor abi handling cleanups These are extracted out of a wip branch I have to get rid of the `extern "unadjusted"` ABI for anything other than LLVM intrinsics.
2025-08-09Rollup merge of #144988 - amandasystems:more-detailed-region-graph, r=lcnrStuart Cook-6/+22
Add annotations to the graphviz region graph on region origins This adds - `(ex<'e>)` for regions whose origin is existential, with name if one exists, - `(for<'p>)` for regions whose origin is a placeholder, with name if one exists For any region whose name we don't know, use `'_`. This has helped _my_ debugging and it doesn't create too bad clutter, I feel. The change ~~is~~was ridiculously small, but I turned it into a separate PR so we can bikeshed the format. The following snippet: ```rust struct Co<'a>(&'a ()); struct Contra<'a>(fn(&'a ())); // `exists<'e> forall<'p> 'p: 'e` -> ERROR fn p_outlives_e( x: for<'e> fn(for<'p> fn(fn(fn(Contra<'e>, Co<'p>)))), ) -> fn(fn(fn(for<'unify> fn(Contra<'unify>, Co<'unify>)))) { x ``` Gives this graph: ![new-naming](https://github.com/user-attachments/assets/f2c8f17c-d29b-4d42-9da7-4b8e520e76a6)
2025-08-09Rollup merge of #144923 - rocurley:float_tests_refactor_3, r=tgross35Stuart Cook-1213/+424
Move several more float tests to floats/mod.rs This PR moves several tests to `floats/mod.rs`, as discussed in https://github.com/rust-lang/rust/issues/141726. The tests moved are: * `test_abs` * `test_signum` * `test_is_sign_positive` * `test_is_sign_negative` * `test_next_up` * `test_next_down` * `test_sqrt_domain` * `test_clamp_min_greater_than_max` * `test_clamp_min_is_nan` * `test_clamp_max_is_nan` * `test_total_cmp` This covers all the "easy" tests: the ones that don't have a lot of precision-specific constants. It's not clear to me that it's worth migrating the others. Each test is its own commit (with the exception of the clamp tests), so it may be easiest to review each commit individually. r? tgross35
2025-08-09Rollup merge of #144883 - scottmcm:remove-unneeded-drop_in_place, r=nnethercoteStuart Cook-7/+61
Remove unneeded `drop_in_place` calls Might as well pull this out from rust-lang/rust#144561 because this is still used in things like `Vec::truncate` where it'd be nice to allow it be removed if inlined enough to see that the type is `Copy`. So long as perf says it's ok, at least 🤞
2025-08-09Rollup merge of #144823 - Zalathar:hir-info, r=oli-obkStuart Cook-136/+142
coverage: Extract HIR-related helper code out of the main module This is a decent chunk of helper code with a narrow external interface (one function returning one struct), making it a good candidate to be extracted out of the main `rustc_mir_transform::coverage` module. No functional changes.
2025-08-09Rollup merge of #141828 - Fulgen301:status-stack-buffer-overrun-diagnostic, ↵Stuart Cook-0/+24
r=wesleywiser Add diagnostic explaining STATUS_STACK_BUFFER_OVERRUN not only being used for stack buffer overruns if link.exe exits with that exit code `STATUS_STACK_BUFFER_OVERRUN` is also used for fast abnormal program termination, e.g. by abort(). Emit a special diagnostic to let people know that this most likely doesn't indicate a stack buffer overrun. This doesn't look up the crash report in the event log to determine what the fast fail error code is. This is due to the way crashes are logged: When a process crash happens, the system logs an "Application Error" event, which contains the exit code and the process ID, but not the fast fail error code. A second event by Windows Error Reporting does contain that fast fail code, but not the process ID - but that event is not emitted at process exit, but when WER has dealt with it (on my system, it happens roughly two seconds later), so querying the code would have to read the `IntegratorReportId`, wait two seconds or potentially longer for the WER event with the same `ReportID`, and read out the code. (Also, that second event doesn't happen if WER is disabled.) Fixes rust-lang/rust#100519.
2025-08-09Rollup merge of #141658 - lolbinarycat:rustdoc-search-stability-rank-138067, ↵Stuart Cook-4/+65
r=GuillaumeGomez rustdoc search: prefer stable items in search results fixes https://github.com/rust-lang/rust/issues/138067 this does add a new field to the search index, but since we're only listing unstable items instead of adding a boolean flag to every item, it should only increase the search index size of sysroot crates, since those are the only ones using the `staged_api` feature, at least as far as the rust project is concerned.
2025-08-09Auto merge of #143376 - dianne:guard-scope, r=matthewjasperbors-46/+172
add a scope for `if let` guard temporaries and bindings This fixes my concern with `if let` guard drop order, namely that the guard's bindings and temporaries were being dropped after their arm's pattern's bindings, instead of before (https://github.com/rust-lang/rust/pull/141295#issuecomment-2968975596). The guard's bindings and temporaries now live in a new scope, which extends until (but not past) the end of the arm, guaranteeing they're dropped before the arm's pattern's bindings. This only introduces a new scope for match arms with guards. Perf results (https://github.com/rust-lang/rust/pull/143376#issuecomment-3034922617) seemed to indicate there wasn't a significant hit to introduce a new scope on all match arms, but guard patterns (rust-lang/rust#129967) will likely benefit from only adding new scopes when necessary (with some patterns requiring multiple nested scopes). Tracking issue for `if_let_guard`: rust-lang/rust#51114 Tests are adapted from examples by `@traviscross,` `@est31,` and myself on rust-lang/rust#141295.
2025-08-09invoke functions from methodsbit-aloo-204/+28
2025-08-09add read_file_by_commit function and invoke from parse_innerbit-aloo-2/+27
2025-08-09add ci_llvm_root function and invoke from parse_innerbit-aloo-1/+11
2025-08-09add git_info function and invoke from parse_innerbit-aloo-10/+14
2025-08-09Merge ref 'ffb9d94dcf4a' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-52006/+79172
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: ffb9d94dcf4ade0d534842be3672d5e9f47e1333 Filtered ref: 2f31646593733abae36e4c05b5a54acfb9f1f6bc This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-09Prepare for merging from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1/+1
This updates the rust-version file to ffb9d94dcf4ade0d534842be3672d5e9f47e1333.
2025-08-09add is_system_llvm function and invoke from parse_innerbit-aloo-1/+33
2025-08-09Auto merge of #145086 - jdonszelmann:revert-allow-internal-unsafe, r=Kobzolbors-82/+23
Revert "Port `#[allow_internal_unsafe]` to the new attribute system" This reverts commit 4f7a6ace9e2f2192af7b5d32f4b1664189e0e143 (PR: https://github.com/rust-lang/rust/pull/144857) r? `@Kobzol` cc: `@scrabsha` clean revert it seems :3
2025-08-09Use new public libtest `ERROR_EXIT_CODE` constant in rustdocGuillaume Gomez-3/+1
2025-08-09Add regression test for doc alias matching vs equivalently matched itemsGuillaume Gomez-0/+47
2025-08-09Rank doc aliases lower than equivalently matched itemsGuillaume Gomez-0/+7
2025-08-09Merge pull request #2541 from kpreid/discordnora-12/+8
Remove mentions of Discord.
2025-08-08Remove mentions of Discord.Kevin Reid-12/+8
The official Discord server is no longer active (cannot be posted to).
2025-08-08Reduce indirect assoc parent queriesCameron Steffen-8/+5
2025-08-08use a let-chain in `needless_bool` (#15444)Samuel Tardieu-1/+3
This is a small thing I noticed while looking into https://github.com/rust-lang/rust-clippy/issues/8014. Since I ultimately decided not to change the code as a response to the issue, I'm now left with this one commit, and I feel a bit unsure about making a PR just for that. This is a problem I have relatively often, so I'd like to know whether I should to batch these small changes somehow, or whether these small PRs are fine after all changelog: none
2025-08-08remove duplicate field in DebugBenjaminBrienen-1/+0
2025-08-08Auto merge of #145126 - tgross35:rollup-6w87usd, r=tgross35bors-791/+1734
Rollup of 8 pull requests Successful merges: - rust-lang/rust#139451 (Add `target_env = "macabi"` and `target_env = "sim"`) - rust-lang/rust#144039 (Use `tcx.short_string()` in more diagnostics) - rust-lang/rust#144192 (atomicrmw on pointers: move integer-pointer cast hacks into backend) - rust-lang/rust#144545 (In rustc_pattern_analysis, put `true` witnesses before `false` witnesses) - rust-lang/rust#144579 (Implement declarative (`macro_rules!`) attribute macros (RFC 3697)) - rust-lang/rust#144649 (Account for bare tuples and `Pin` methods in field searching logic) - rust-lang/rust#144775 (more strongly dissuade use of `skip_binder`) - rust-lang/rust#144987 (Enable f16 and f128 on targets that were fixed in LLVM21) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-08Refactor map_unit_fn lintCameron Steffen-68/+39
2025-08-08Rollup merge of #144987 - tgross35:llvm21-f16-f128, r=nikicTrevor Gross-11/+13
Enable f16 and f128 on targets that were fixed in LLVM21 LLVM21 fixed the new float types on a number of targets: * SystemZ gained f16 support https://github.com/llvm/llvm-project/pull/109164 * Hexagon now uses soft f16 to avoid recursion bugs https://github.com/llvm/llvm-project/pull/130977 * Mips now correctly handles f128 (actually since LLVM20) https://github.com/llvm/llvm-project/pull/117525 * f128 is now correctly aligned when passing the stack on x86 https://github.com/llvm/llvm-project/pull/138092 Thus, enable the types on relevant targets for LLVM > 21.0.0. NVPTX also gained handling of f128 as a storage type, but it lacks support for basic math operations so is still disabled here. try-job: dist-i586-gnu-i586-i686-musl try-job: dist-i686-linux try-job: dist-i686-msvc try-job: dist-s390x-linux try-job: dist-various-1 try-job: dist-various-2 try-job: dist-x86_64-linux try-job: i686-gnu-1 try-job: i686-gnu-2 try-job: i686-msvc-1 try-job: i686-msvc-2 try-job: test-various