about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-03-10rustdoc.d.ts: add window.{register_implementors,pending_implementors}binarycat-3/+17
2025-03-10rustdoc.d.ts: window.SIDEBAR_ITEMS may exist.binarycat-1/+2
2025-03-10main.js: handle document.activeElement being nullbinarycat-2/+2
this is technically possible if someone sticks rustdoc in an iframe, i think?
2025-03-10main.js(isDisplayed): coerce truthy values to booleanbinarycat-3/+2
2025-03-10main.js: always refer to searchState through window.searchStatebinarycat-10/+5
2025-03-10main.js: handleEscape and handleShortcut accept KeyboardEventbinarycat-2/+6
2025-03-10main.js: give type signatures to a few helper functionsbinarycat-4/+8
2025-03-10main.js: don't set mouseMovedAfterSearch, as it is never readbinarycat-1/+0
2025-03-10main.js: insertAfter needs non-root referenceNodebinarycat-4/+1
2025-03-10Auto merge of #138200 - weihanglo:update-cargo, r=weihanglobors-1/+0
Update cargo 22 commits in 2622e844bc1e2e6123e54e94e4706f7b6195ce3d..ab1463d632528e39daf35f263e10c14cbe590ce8 2025-02-28 12:33:57 +0000 to 2025-03-08 01:45:05 +0000 - test: redact host target when comparing CARGO_ENV path (rust-lang/cargo#15279) - feat: add completions for install --path (rust-lang/cargo#15266) - fix(package): report lockfile / workspace manifest is dirty (rust-lang/cargo#15276) - feat(tree): Add `--depth public` behind `-Zunstable-options` (rust-lang/cargo#15243) - Don't use `$CARGO_BUILD_TARGET` in `cargo metadata` (rust-lang/cargo#15271) - feat: show extra build description from bootstrap (rust-lang/cargo#15269) - Upgrade to `rustc-stable-hash v0.1.2` (rust-lang/cargo#15268) - fix: Respect --frozen everywhere --offline or --locked is accepted (rust-lang/cargo#15263) - feat(tree): Color the output (rust-lang/cargo#15242) - fix(vendor): dont remove non-cached source (rust-lang/cargo#15260) - docs: lockfile is always included since 1.84 (rust-lang/cargo#15257) - Remove `Cargo.toml` from `package.include` in example (rust-lang/cargo#15253) - Small cleanup: remove unneeded result (rust-lang/cargo#15256) - Fix typo in build-scripts.md (rust-lang/cargo#15254) - chore(deps): update rust crate pulldown-cmark to 0.13.0 (rust-lang/cargo#15250) - chore(deps): update compatible (rust-lang/cargo#15249) - feat(cli): forward bash completions of third party subcommands (rust-lang/cargo#15247) - feat: add completions for `--lockfile-path` (rust-lang/cargo#15238) - fix: reset $CARGO if the running program is real `cargo[.exe]` (rust-lang/cargo#15208) - Get all members as `available targets` even though default-members was specified. (rust-lang/cargo#15199) - refactor: control byte display precision with std::fmt options (rust-lang/cargo#15246) - fix(package): Ensure we can package directories ending with '.rs' (rust-lang/cargo#15240)
2025-03-10Auto merge of #136780 - joboet:move_pal_stdio, r=Amanieubors-150/+77
std: move stdio to `sys` As per #117276, this moves the platform definitions of `Stdout` and friends into `sys`. This PR also unifies the UNIX and Hermit implementations and moves the `__rust_print_err` function needed by libunwind on SGX into the dedicated module for such helper functions.
2025-03-10Auto merge of #137899 - notriddle:merged-doctests-stable, ↵bors-59/+221
r=fmease,GuillaumeGomez doctests: fix merging on stable Fixes #137898 The generated multi-test harness relies on nightly-only APIs, so the only way to run it on stable is to enable them. To prevent the executing test case from getting at any of the stuff that the harness uses, they're built as two separate crates. The test bundle isn't built with RUSTC_BOOTSTRAP, while the runner harness is.
2025-03-10doctests: build test bundle and harness separatelyMichael Howell-64/+221
This prevents the included test case from getting at nightly-only features when run on stable. The harness builds with RUSTC_BOOTSTRAP, but the bundle doesn't.
2025-03-10doctests: fix merging on stableMichael Howell-1/+6
Fixes #137898 The generated multi-test harness relies on nightly-only APIs, so the only way to run it on stable is to enable them. Since tests that use crate attrs don't be merged, there's no way to use nightly-only features on it anyway.
2025-03-09std: move stdio to `sys`joboet-150/+77
As per #117276, this moves the platform definitions of `Stdout` and friends into `sys`. This PR also unifies the UNIX and Hermit implementations and moves the `__rust_print_err` function needed by libunwind on SGX into the dedicated module for such helper functions.
2025-03-09Auto merge of #137695 - nnethercote:always-inline-query_get_at, r=saethlinbors-1/+1
Always inline `query_get_at`. r? `@saethlin`
2025-03-09Auto merge of #138279 - matthiaskrgr:rollup-ndnoipr, r=matthiaskrgrbors-115/+160
Rollup of 7 pull requests Successful merges: - #122790 (Apply dllimport in ThinLTO) - #137650 (Move `fs` into `sys`) - #138228 (Use `disjoint_bitor` inside `borrowing_sub`) - #138233 (Windows: Don't link std (and run-make) against advapi32, except on win7) - #138253 (Continue to check attr if meet empty repr for adt) - #138263 (Fix `repr128-dwarf` test) - #138276 (Lazy load NtOpenFile for UWP) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-09Rollup merge of #138276 - bdbai:fix-uwp-ntopenfile, r=ChrisDentonMatthias Krüger-0/+11
Lazy load NtOpenFile for UWP Lazily load `NtOpenFile` to allow libraries targeting UWP to build and link. Fixes #138257 . r? `@ChrisDenton`
2025-03-09Rollup merge of #138263 - beetrees:fix-repr128-dwarf, r=jieyouxuMatthias Krüger-7/+8
Fix `repr128-dwarf` test The test now correctly ignores enums from `std`. Fixes #138254 Unblocks #138200
2025-03-09Rollup merge of #138253 - mu001999-contrib:fix-138241, r=jdonszelmannMatthias Krüger-1/+37
Continue to check attr if meet empty repr for adt Fixes #138241 Returning while checking ReprEmpty results in missing the check for the next repr
2025-03-09Rollup merge of #138233 - smmalis37:no-advapi32, r=ChrisDentonMatthias Krüger-13/+19
Windows: Don't link std (and run-make) against advapi32, except on win7 Std no longer depends on any functionality provided by advapi32, so we can remove it from the list of external libraries we link against. Except, the win7 targets do still rely on advapi32-provided functionality. This PR therefore moves linking against it to only occur on win7 targets, so that no new uses of it slip in without being noticed.
2025-03-09Rollup merge of #138228 - TDecking:master, r=jhprattMatthias Krüger-3/+8
Use `disjoint_bitor` inside `borrowing_sub` This makes the definition of `borrowing_sub` consistent with that of `carrying_add`.
2025-03-09Rollup merge of #137650 - thaliaarchi:move-fs-pal, r=NoratriebMatthias Krüger-57/+72
Move `fs` into `sys` Move platform definitions of `fs` into `std::sys`, as part of https://github.com/rust-lang/rust/issues/117276. cc `@joboet`
2025-03-09Rollup merge of #122790 - Zoxc:dllimp-rev, r=ChrisDentonMatthias Krüger-34/+5
Apply dllimport in ThinLTO This partially reverts https://github.com/rust-lang/rust/pull/103353 by properly applying `dllimport` if `-Z dylib-lto` is passed. That PR should probably fully be reverted as it looks quite sketchy. We don't know locally if the entire crate graph would be statically linked. This should hopefully be sufficient to make ThinLTO work for rustc on Windows. r? ``@wesleywiser`` --- Edit: This PR is changed to just generally revert https://github.com/rust-lang/rust/pull/103353.
2025-03-09Auto merge of #137655 - nnethercote:split-edges-iterator, r=nnethercotebors-93/+132
Split the `Edges` iterator. Some nice performance wins here, mostly on the `wg-grammar` benchmark. r? `@lcnr`
2025-03-09Lazy load NtOpenFile for UWPbdbai-0/+11
2025-03-09Auto merge of #138267 - matthiaskrgr:rollup-vt76bhs, r=matthiaskrgrbors-1359/+2399
Rollup of 12 pull requests Successful merges: - #136127 (Allow `*const W<dyn A> -> *const dyn A` ptr cast) - #136968 (Turn order dependent trait objects future incompat warning into a hard error) - #137319 (Stabilize `const_vec_string_slice`) - #137885 (tidy: add triagebot checks) - #138040 (compiler: Use `size_of` from the prelude instead of imported) - #138084 (Use workspace lints for crates in `compiler/`) - #138158 (Move more layouting logic to `rustc_abi`) - #138160 (depend more on attr_data_structures and move find_attr! there) - #138192 (crashes: couple more tests) - #138216 (bootstrap: Fix stack printing when a step cycle is detected) - #138232 (Reduce verbosity of GCC build log) - #138242 (Revert "Don't test new error messages with the stage 0 compiler") r? `@ghost` `@rustbot` modify labels: rollup
2025-03-09Rollup merge of #138242 - tshepang:that-stage0-has-arrived, r=jieyouxuMatthias Krüger-8/+6
Revert "Don't test new error messages with the stage 0 compiler"
2025-03-09Rollup merge of #138232 - Kobzol:gcc-reduce-verbosity, r=GuillaumeGomezMatthias Krüger-2/+11
Reduce verbosity of GCC build log It was a bit too spammy before. Fixes: https://github.com/rust-lang/rust/issues/138213 r? ``@GuillaumeGomez``
2025-03-09Rollup merge of #138216 - Zalathar:any-debug, r=onur-ozkanMatthias Krüger-2/+75
bootstrap: Fix stack printing when a step cycle is detected When bootstrap detects a step dependency cycle (which represents a bootstrap bug), it is supposed to print out the contents of the step stack as part of its panic message. However, while investigating #138205 it was found that bootstrap was actually printing out several copies of `Any { .. }`, because that is the Debug implementation for `dyn Any`. This is sadly not very helpful. This PR fixes that problem by introducing a `trait AnyDebug: Any + Debug` that delegates to the underlying type's Debug implementation, while still allowing downcasting via Any. --- The fixed behaviour can be verified manually (and is tested automatically) via a new dummy command, `./x run cyclic-step`: ``` $ x run cyclic-step Building bootstrap Finished `dev` profile [unoptimized] target(s) in 0.02s thread 'main' panicked at src/bootstrap/src/core/builder/mod.rs:1521:17: Cycle in build detected when adding CyclicStep { n: 0 } CyclicStep { n: 0 } CyclicStep { n: 1 } CyclicStep { n: 2 } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Build completed unsuccessfully in 0:00:00 ```
2025-03-09Rollup merge of #138192 - matthiaskrgr:crashes_mar, r=jieyouxuMatthias Krüger-0/+569
crashes: couple more tests try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl
2025-03-09Rollup merge of #138160 - jdonszelmann:move-find-attr2, r=oli-obkMatthias Krüger-68/+73
depend more on attr_data_structures and move find_attr! there r? ``@oli-obk`` This should be an easy one. It just moves some imports around. This is necessary for other changes that I'm working on not to have import cycles. However, it's an easy one to just merge on its own.
2025-03-09Rollup merge of #138158 - moulins:move-layout-to-rustc_abi, r=workingjubileeMatthias Krüger-750/+754
Move more layouting logic to `rustc_abi` Move all `LayoutData`-constructing code to `rustc_abi`: - Infaillible operations get a new `LayoutData` constructor method; - Faillible ones get a new method on `LayoutCalculator`.
2025-03-09Rollup merge of #138084 - nnethercote:workspace-lints, r=jieyouxuMatthias Krüger-90/+252
Use workspace lints for crates in `compiler/` This is nicer and hopefully less error prone than specifying lints via bootstrap. r? ``@jieyouxu``
2025-03-09Rollup merge of #138040 - thaliaarchi:use-prelude-size-of.compiler, ↵Matthias Krüger-74/+64
r=compiler-errors compiler: Use `size_of` from the prelude instead of imported Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. Apply this change across the compiler. These functions were added to all preludes in Rust 1.80. r? ``@compiler-errors``
2025-03-09Rollup merge of #137885 - klensy:tidy-triagebot, r=jieyouxuMatthias Krüger-11/+103
tidy: add triagebot checks Validates triagebot.toml to have existing paths: `[mentions."*"]` sections, i.e. ```toml [mentions."compiler/rustc_const_eval/src/"] ``` or ```toml [assign.owners] "/.github/workflows" = ["infra-ci"] ``` or ```toml trigger_files = [ "src/librustdoc/html/static/js/search.js", "tests/rustdoc-js", "tests/rustdoc-js-std", ] ``` Looked at #137876 and implemented check.
2025-03-09Rollup merge of #137319 - Kixunil:stabilize-const-vec-string-slice, r=dtolnayMatthias Krüger-16/+17
Stabilize `const_vec_string_slice` This feature was approved for stabilization in https://github.com/rust-lang/rust/issues/129041#issuecomment-2508940661 so this change stabilizes it.
2025-03-09Rollup merge of #136968 - oli-obk:bye-bye, r=compiler-errorsMatthias Krüger-330/+38
Turn order dependent trait objects future incompat warning into a hard error fixes #56484 r? ``@ghost`` will FCP when we have a crater result
2025-03-09Rollup merge of #136127 - WaffleLapkin:dyn_ptr_unwrap_cast, r=compiler-errorsMatthias Krüger-8/+437
Allow `*const W<dyn A> -> *const dyn A` ptr cast Followup of https://github.com/rust-lang/rust/pull/120248#discussion_r1487936000. This PR allows casting pointers from something wrapping a trait object, to the trait object, i.e. `*const W<dyn A> -> *const dyn A` where `W` is `struct W<T: ?Sized>(T);`. r? compiler-errors Fixes https://github.com/rust-lang/rust/issues/128625
2025-03-09Auto merge of #137563 - FractalFir:dep_graph_cap, r=nnethercotebors-2/+1
Change TaskDeps to start preallocated with 128 capacity This is a tiny change that makes `TaskDeps::read_set` start preallocated with capacity for 128 elements. From local profiling, it looks like `TaskDeps::read_set` is one of the most-often resized hash-sets in `rustc`.
2025-03-09Fix `repr128-dwarf` testbeetrees-7/+8
2025-03-09Auto merge of #137541 - onur-ozkan:fix-cargo-clippy-bin, r=jieyouxubors-4/+15
add `tool::CargoClippy` and `tool::Cargofmt` binary to target sysroot When running `x build clippy`, we expect `stage1-tool-bin/cargo-clippy` and `stage2/bin/cargo-clippy` to be the same, but they aren't. This happens because `tool::CargoClippy` doesn't place its binary in the `stage2` directory. As a result, `stage1-tool-bin/cargo-clippy` comes from `tool::CargoClippy`, while `stage2/bin/cargo-clippy` comes from `tool::Cargo`. Same applies for `tool::Cargofmt`. This PR fixes the issue by adding `tool::CargoClippy` and ``tool::Cargofmt`` binaries to the expected sysroot and makes sure both directories share the same binary. To test this, run `x build --stage 2 compiler clippy rustfmt`, link the stage2 sysroot with rustup, and then call `cargo +stage2 fmt` and `cargo +stage2 clippy` on any rust project (it wouldn't work without this PR).
2025-03-09continue to check attr if meet empty repr for adtMu001999-1/+37
2025-03-09Auto merge of #137513 - scottmcm:identity-transmute, r=saethlinbors-0/+32
Don't re-`assume` in `transmute`s that don't change niches I noticed in nightly 2025-02-21 that `transmute` is emitting way more `assume`s than necessary for newtypes. For example, the three transmutes in <https://rust.godbolt.org/z/fW1KaTc4o> emits ```rust define noundef range(i32 1, 0) i32 `@repeatedly_transparent_transmute(i32` noundef range(i32 1, 0) %_1) unnamed_addr { start: %0 = sub i32 %_1, 1 %1 = icmp ule i32 %0, -2 call void `@llvm.assume(i1` %1) %2 = sub i32 %_1, 1 %3 = icmp ule i32 %2, -2 call void `@llvm.assume(i1` %3) %4 = sub i32 %_1, 1 %5 = icmp ule i32 %4, -2 call void `@llvm.assume(i1` %5) %6 = sub i32 %_1, 1 %7 = icmp ule i32 %6, -2 call void `@llvm.assume(i1` %7) %8 = sub i32 %_1, 1 %9 = icmp ule i32 %8, -2 call void `@llvm.assume(i1` %9) %10 = sub i32 %_1, 1 %11 = icmp ule i32 %10, -2 call void `@llvm.assume(i1` %11) ret i32 %_1 } ``` But those are all just newtypes that don't change size or niches, so none of it's needed. After this PR it's down to just ```rust define noundef range(i32 1, 0) i32 `@repeatedly_transparent_transmute(i32` noundef range(i32 1, 0) %_1) unnamed_addr { start: ret i32 %_1 } ``` because none of those `assume`s in the original actually did anything. (Transmuting to something with a difference niche, though, still has the assumes -- the other tests continue to pass checking that.)
2025-03-08Move fs into sysThalia Archibald-55/+70
2025-03-08Erase non-pal sys platform pathsThalia Archibald-2/+2
2025-03-08Auto merge of #137502 - compiler-errors:global-asm-aint-mir-body, r=oli-obkbors-7/+54
Don't include global asm in `mir_keys`, fix error body synthesis r? oli-obk Fixes #137470 Fixes #137471 Fixes #137472 Fixes #137473 try-job: test-various try-job: x86_64-apple-2
2025-03-08Revert "Don't test new error messages with the stage 0 compiler"Tshepang Mbambo-8/+6
This reverts commit ae428141f7b99511e327ad28daf988978a376d86.
2025-03-08crashes: couple more testsMatthias Krüger-0/+569
2025-03-08Auto merge of #137500 - scottmcm:trunc-br, r=saethlinbors-8/+118
Use `trunc nuw`+`br` for 0/1 branches even in optimized builds Rather than needing to use `switch` for them to include the `unreachable` arm.