about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-02-15Merge pull request #2246 from marxin/CI-more-ofterNoah Lev-2/+2
Run CI multiple times a day
2025-02-15Merge pull request #2254 from marxin/start-using-latest-linkcheck2Noah Lev-1/+1
Start using latest release where -f checks all local links
2025-02-15Fix CI scheduleMartin Liska-1/+1
2025-02-14Merge pull request #2252 from chenyukang/fix-perf许杰友 Jieyou Xu (Joe)-0/+7
Add note for perf issue
2025-02-14Merge pull request #2253 from marxin/fix-link2Yuki Okushi-1/+1
Fix borked link
2025-02-14Start using latest release where -f checks all local linksMartin Liska-1/+1
2025-02-14Fix borked linkMartin Liska-1/+1
2025-02-14add notes for perf issueyukang-0/+7
2025-02-13Merge pull request #2250 from jyn514/logging许杰友 Jieyou Xu (Joe)-2/+41
document bootstrap logging
2025-02-12document bootstrap loggingjyn-2/+41
2025-02-12Run CI multiple times a dayMartin Liska-2/+2
2025-02-10Merge pull request #2244 from rust-lang/rustc-pullYuki Okushi-15060/+27725
Rustc pull update
2025-02-10Merge from rustcThe rustc-dev-guide Cronjob Bot-15059/+27724
2025-02-10Preparing for merge from rustcThe rustc-dev-guide Cronjob Bot-1/+1
2025-02-09Auto merge of #136751 - bjorn3:update_rustfmt, r=Mark-Simulacrumbors-5069/+6349
Update bootstrap compiler and rustfmt The rustfmt version we previously used formats things differently from what the latest nightly rustfmt does. This causes issues for subtrees that get formatted both in-tree and in their own repo. Updating the rustfmt used in-tree solves those issues. Also bumped the bootstrap compiler as the stage0 update command always updates both at the same time.
2025-02-09Auto merge of #136754 - Urgau:rollup-qlkhjqr, r=Urgaubors-386/+3828
Rollup of 5 pull requests Successful merges: - #134679 (Windows: remove readonly files) - #136213 (Allow Rust to use a number of libc filesystem calls) - #136530 (Implement `x perf` directly in bootstrap) - #136601 (Detect (non-raw) borrows of null ZST pointers in CheckNull) - #136659 (Pick the max DWARF version when LTO'ing modules with different versions ) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-09Auto merge of #136762 - workingjubilee:rollup-23fn0nl, r=workingjubileebors-211/+288
Rollup of 8 pull requests Successful merges: - #136397 (Add a comment pointing to ICE-136223) - #136686 (Clean up `HashMap` and `HashSet` docs.) - #136706 (compiler: mostly-finish `rustc_abi` updates) - #136710 (Document `Sum::sum` returns additive identities for `[]`) - #136724 (Make `AsyncFnOnce`, `AsyncFnMut`, `AsyncFn` non-`#[fundamental]`) - #136727 (Have a break from review rotation) - #136730 (transmutability: fix ICE when passing wrong ADT to ASSUME) - #136736 (Small resolve refactor) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-08Rollup merge of #136736 - llogiq:small-resolve-refactor, r=jieyouxuJubilee-16/+17
Small resolve refactor I was looking into how resolve works in order to find a good way for clippy to shorten paths in messages and suggestions, and found a needless `.collect()` and a recursive function that could be written as a loop, also removed a panicky code path.
2025-02-08Rollup merge of #136730 - lukas-code:trans-ice, r=jswrennJubilee-18/+45
transmutability: fix ICE when passing wrong ADT to ASSUME - Remove an incorrect assert that the `ASSUME` parameter has the type `Assume` and delay a bug instead. - Since we checked the type of `ASSUME` is `Assume` (an ADT), its valtree must be a branch, so we can just unwrap it. r? ```@jswrenn```
2025-02-08Rollup merge of #136727 - chenyukang:yukang-fix-review-scope, r=workingjubileeJubilee-1/+0
Have a break from review rotation Be busy on the job recently.
2025-02-08Rollup merge of #136724 - steffahn:asyncfn-non-fundamental, r=compiler-errorsJubilee-3/+0
Make `AsyncFnOnce`, `AsyncFnMut`, `AsyncFn` non-`#[fundamental]` Address the issue #136723 on nightly (the issue will only *actually* be fixed with a beta backport).
2025-02-08Rollup merge of #136710 - JakenHerman:jaken/iterator-docs, r=workingjubileeJubilee-1/+6
Document `Sum::sum` returns additive identities for `[]` Because the neutral element of `<fNN as iter::Sum>` was changed to `neg_zero`, the documentation needed to be updated, as it was reporting inadequate information about what should be expected from the return. Relevant Commit: https://github.com/rust-lang/rust/commit/490818851860fb257e23fe7aa0ee32eaffc4ba40 Relevant Pull Request: https://github.com/rust-lang/rust/pull/129321 --- The referenced commit causes unintended side effects on presentation layer applications like using Tera templates, for example. I'm not sure what the motivation was behind the original change, but it seems like more discussion should be put into this issue and potentially have that change reverted.
2025-02-08Rollup merge of #136706 - workingjubilee:finish-up-rustc-abi-updates, ↵Jubilee-159/+205
r=compiler-errors compiler: mostly-finish `rustc_abi` updates This almost-finishes all the updates in the compiler to use `rustc_abi` and removes some of the reexports of `rustc_abi` items in `rustc_target` that were previously available. r? ```@compiler-errors```
2025-02-08Rollup merge of #136686 - bjoernager:master, r=jhprattJubilee-8/+8
Clean up `HashMap` and `HashSet` docs. This commit makes some small, pedantic changes to the docs for `HashMap` and `HashSet`, which fixes that: * "HashMap" is not always formatted as code (as in `HashMap`), and that * `HashSet` sometimes references `HashMap` instead of itself.
2025-02-08Rollup merge of #136397 - ↵Jubilee-5/+7
Shunpoco:issue-136223-ICE-pattern-mutability-cap-violated, r=Nadrieril Add a comment pointing to ICE-136223 Fixes #136223 ## Steps how the ICE happen This explanation is based on the test case `&Some(Some(x)) = &Some(&mut Some(0))`. The case should fail with E0596 error, but it catches the debug assertion instead. 1. For the first `&`: In check_pat_ref(), the value max_ref_mutbl becomes MutblCap::Not ([here](https://github.com/rust-lang/rust/blob/fdd1a3b02687817cea41f6bacae3d5fbed2b2cd0/compiler/rustc_hir_typeck/src/pat.rs#L2394-L2396)). Once max_ref_mutbl becomes Not, it will never be back to MutblCap::Mut. 2. For `&mut`: In peel_off_references(), because Some(x) doesn't have `&` nor `&mut`, `&mut` in `&mut Some(0)` is not consumed then default_binding_mode (def_br) becomes `ByRef::Yes(Mutability::Mut)` (around [here](https://github.com/rust-lang/rust/blob/fdd1a3b02687817cea41f6bacae3d5fbed2b2cd0/compiler/rustc_hir_typeck/src/pat.rs#L519-L536)). This will be inherited to the next step. So this pattern has the mismatch between `def_br=Yes(Mut)` and `max_ref_mutbl=Not` now. 3. For the value `0`: Because of the step 2, the default_binding_mode is `Yes(Mut)`, but max_ref_mutbl is `Not` from the step 1. It causes the assertion error [here](https://github.com/rust-lang/rust/blob/fdd1a3b02687817cea41f6bacae3d5fbed2b2cd0/compiler/rustc_hir_typeck/src/pat.rs#L427-L430). ## What this PR fixes Step 1 has happened from [this commit](https://github.com/rust-lang/rust/commit/e2f3ce956809dd98adf271afe0b024c7febdf47f) by deleting `no_ref_mut_behind_and` from the if block. In my understanding, after RFC3627 is released, step 1 should happen not only 2024 edition but also other editions to track MutblCap value. But for now, it should not happen for non-2024 edition. So I put it back. NOTE: I think there is another solution - We should return an E0596 error in calc_default_binding_mode() instead of the debug assertion. Since the assertion is caused by the mismatch between `def_br = Yes(Mut)` and `max_ref_mutbl = Not`, but in my understanding this violation is the same as E0596. check_pat_ident() does returns E0596 by a similar reason [here](https://github.com/rust-lang/rust/blob/fdd1a3b02687817cea41f6bacae3d5fbed2b2cd0/compiler/rustc_hir_typeck/src/pat.rs#L837-L856).
2025-02-09Rollup merge of #136659 - wesleywiser:dwarf_version_lto_merge_behavior, ↵Urgau-1/+49
r=jieyouxu Pick the max DWARF version when LTO'ing modules with different versions Currently, when rustc compiles code with `-Clto` enabled that was built with different choices for `-Zdwarf-version`, a warning will be reported. It's very easy to observe this by compiling most anything (eg, "hello world") and specifying `-Clto -Zdwarf-version=5` since the standard library is distributed with `-Zdwarf-version=4`. This behavior isn't actually useful for a few reasons: - From observation, LLVM chooses to pick the highest DWARF version anyway after issuing the warning. - Clang specifies that in this case, the max version should be picked without a warning and as a general principle, we want to support x-lang LTO with Clang which implies using the same module flag merge behaviors. - Debuggers need to be able to handle a variety of versions within the same debugging session as you can easily have some parts of a binary (or some dynamic libraries within an application) all compiled with different DWARF versions. This commit changes the module flag merge behavior to match Clang and use the highest version of DWARF. It also adds a test to ensure this behavior is respected in the case of two crates being LTO'd together and adds a test to ensure no warning is printed. Fixes #130041 which fails due to these warnings being printed cc #103057
2025-02-09Rollup merge of #136601 - compiler-errors:borrow-null-zst, r=saethlinUrgau-38/+85
Detect (non-raw) borrows of null ZST pointers in CheckNull Fixes #136568. Ensures that we check that borrows of derefs are non-null in the `CheckNull` pass **even if** it's a ZST pointee. I'm actually surprised that this is UB in Miri, but if it's certainly UB, then this PR modifies the null check to be stricter. I couldn't find anywhere in https://doc.rust-lang.org/reference/behavior-considered-undefined.html that discusses this case specifically, but I didn't read it too closely, or perhaps it's just missing a bullet point. On the contrary, if this is actually erroneous UB in Miri, then I'm happy to close this (and perhaps fix the null check in Miri to exclude ZSTs?) On the double contrary, if this is still an "open question", I'm also happy to close this and wait for a decision to be made. r? ``@saethlin`` cc ``@RalfJung`` (perhaps you feel strongly about this change)
2025-02-09Rollup merge of #136530 - Kobzol:x-perf, r=onur-ozkanUrgau-341/+3642
Implement `x perf` directly in bootstrap Discussed [here](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Turning.20.60x.20perf.60.20into.20a.20first.20class.20command). Implementing the command directly in bootstrap let's us correctly build the compiler toolchain based on input arguments (such as include rustdoc in the toolchain [only] when needed), and it also makes the CLI interface nicer. r? ``@onur-ozkan``
2025-02-09Rollup merge of #136213 - erickt:fs, r=Mark-SimulacrumUrgau-1/+17
Allow Rust to use a number of libc filesystem calls This allows Rust on Fuchsia to use a number of function calls from libc: * dirfd * fdatasync * flock with LOCK_EX, LOCK_SH, LOCK_NB, LOCK_UN * fstatat cc #120426 try-job: dist-various-2
2025-02-09Rollup merge of #134679 - ChrisDenton:rm-readonly, r=Mark-SimulacrumUrgau-5/+35
Windows: remove readonly files When calling `remove_file`, we shouldn't fail to delete readonly files. As the test makes clear, this make the Windows behaviour consistent with other platforms. This also makes us internally consistent with `remove_dir_all`. try-job: x86_64-msvc-ext1
2025-02-08occured -> occurredMichael Goulet-10/+10
2025-02-08Rustfmtbjorn3-4606/+5886
2025-02-08Update bootstrap compiler and rustfmtbjorn3-463/+463
The rustfmt version we previously used formats things differently from what the latest nightly rustfmt does. This causes issues for subtrees that get formatted both in-tree and in their own repo. Updating the rustfmt used in-tree solves those issues. Also bumped the bootstrap compiler as the stage0 update command always updates both at the same time.
2025-02-08Document `Sum::sum` returns additive identities for `[]`Jaken Herman-1/+6
Because the neutral element of `<fNN as iter::Sum>` was changed to `neg_zero`, the documentation needed to be updated, as it was reporting inadequate information about what should be expected from the return. Co-authored-by: Jubilee <workingjubilee@gmail.com>
2025-02-08Detect (non-raw) borrows of null ZST pointers in CheckNullMichael Goulet-29/+76
2025-02-08Auto merge of #136747 - matthiaskrgr:rollup-qfiiv4n, r=matthiaskrgrbors-802/+857
Rollup of 6 pull requests Successful merges: - #135696 (std: move `io` module out of `pal`, get rid of `sys_common::io`) - #136099 (Optimize `Rc::<str>::default()` implementation) - #136200 (Generate correct terminate block under Wasm EH) - #136626 (create `initial_rustdoc` field in `Build`) - #136657 (Make empty-line-after an early clippy lint) - #136679 (ci: Use largedisk for loongarch) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-08Rollup merge of #136679 - Flakebi:loongarch64-diskspace, r=marcoieniMatthias Krüger-2/+2
ci: Use largedisk for loongarch `dist-loongarch64-linux` and `dist-loongarch64-musl` seem to run out of disk space when adding the amdgpu LLVM backend. There are changes underway to free more disk space, but that may take a while, so it was suggested to switch the affected jobs to a largedisk runner until that is ready. `dist-powerpc64-linux` is another job that ran out of disk space one time, but it succeeded the other times, so I did not include it here. amdgpu target PR with more references to the failures: #134740 r? ```@marcoieni```
2025-02-08Rollup merge of #136657 - jdonszelmann:empty-line-after, ↵Matthias Krüger-472/+621
r=y21,flip1995,WaffleLapkin Make empty-line-after an early clippy lint r? ```@y21``` 95% a refiling of https://github.com/rust-lang/rust-clippy/pull/13658 but for correctness it needed 2 extra methods in `rust_lint` which made it much easier to apply on `rust-lang/rust` than `rust-lang/rust-clippy`. Commits have been thoroughly reviewed on `rust-lang/clippy already`. The last two review comments there (about using `Option` and popping for assoc items have been applied here.
2025-02-08Rollup merge of #136626 - onur-ozkan:initial-rustdoc, r=jieyouxuMatthias Krüger-1/+3
create `initial_rustdoc` field in `Build` just a minor improvement
2025-02-08Rollup merge of #136200 - purplesyringa:wasm-eh-fixes, r=bjorn3Matthias Krüger-6/+60
Generate correct terminate block under Wasm EH This fixes failing LLVM assertions during insnsel. Improves #135665. r? bjorn3 ^ you reviewed the PR bringing Wasm EH in, I assume this is within your area of expertise?
2025-02-08Rollup merge of #136099 - Kijewski:pr-rc-str-default, r=ibraheemdevMatthias Krüger-3/+6
Optimize `Rc::<str>::default()` implementation This PR lets `impl Default for Rc<str>` re-use the implementation for `Rc::<[u8]>::default()`. The previous version only calculted the memory layout at runtime, even though it should be known at compile time, resulting in an additional function call. The same optimization is done for `Rc<CStr>`. Generated byte code: <https://godbolt.org/z/dfq73jsoP>. Resolves <https://github.com/rust-lang/rust/issues/135784>. Cc `@Billy-Sheppard.`
2025-02-08Rollup merge of #135696 - joboet:move_pal_io, r=NoratriebMatthias Krüger-318/+165
std: move `io` module out of `pal`, get rid of `sys_common::io` Part of #117276. This does two related things: 1. It moves the platform-specific definitions for `IoSlice`, `IoSliceMut` and `is_terminal` out of `pal` and into `sys` and unifies some of them. 2. It gets rid of `sys_common::io`, moving the non-platform-specific test helpers into `std::test_helpers` and the buffer size definition to the new `sys::io` module.
2025-02-08Auto merge of #136715 - bjorn3:sync_cg_clif-2025-02-07, r=bjorn3bors-71/+97
Subtree sync for rustc_codegen_cranelift The main highlights this time are a Cranelift update and a fix for a warning that the x87 feature is not enabled. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler<!-- homu-ignore:start -->
2025-02-08Pick the max DWARF version when LTO'ing modules with different versionsWesley Wiser-5/+5
Currently, when rustc compiles code with `-Clto` enabled that was built with different choices for `-Zdwarf-version`, a warning will be reported. It's very easy to observe this by compiling most anything (eg, "hello world") and specifying `-Clto -Zdwarf-version=5` since the standard library is distributed with `-Zdwarf-version=4`. This behavior isn't actually useful for a few reasons: - from observation, LLVM chooses to pick the highest DWARF version anyway after issuing the warning - Clang specifies that in this case, the max version should be picked without a warning and as a general principle, we want to support x-lang LTO with Clang which implies using the same module flag merge behaviors - Debuggers need to be able to handle a variety of versions withing the same debugging session as you can easily have some parts of a binary (or some dynamic libraries within an application) all compiled with different DWARF versions This commit changes the module flag merge behavior to match Clang and use the highest version of DWARF. It also adds a test to ensure this behavior is respected in the case of two crates being LTO'd together and updates the test added in the previous commit to ensure no warning is printed.
2025-02-08Add tests for -Zdwarf-version lto behaviorWesley Wiser-0/+48
2025-02-08Auto merge of #136728 - matthiaskrgr:rollup-x2qh9yt, r=matthiaskrgrbors-51/+70
Rollup of 6 pull requests Successful merges: - #136640 (Debuginfo for function ZSTs should have alignment of 8 bits, not 1 bit) - #136648 (Add a missing `//@ needs-symlink` to `tests/run-make/libs-through-symlinks`) - #136651 (Label mismatched parameters at the def site for foreign functions) - #136691 (Remove Linkage::Private and Linkage::Appending) - #136692 (add module level doc for bootstrap:utils:exec) - #136700 (i686-unknown-hurd-gnu: bump baseline CPU to Pentium 4) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-08Small resolve refactorAndre Bogus-16/+17
2025-02-07compiler: use rustc_abi in rustc_ast_*Jubilee Young-16/+19
2025-02-08Auto merge of #136725 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 14 commits in 0e3d73849ab8cbbab3ec5c65cbd555586cb21339..2928e32734b04925ee51e1ae88bea9a83d2fd451 2025-02-01 20:14:40 +0000 to 2025-02-07 16:50:22 +0000 - Simplify backtrack (rust-lang/cargo#15150) - Don't use on Solaris libc::LOCK_* which were removed from libc in ver… (rust-lang/cargo#15143) - feat: emit error if package not found within workspace (rust-lang/cargo#15071) - Make cache tracking resilient to unexpected files (rust-lang/cargo#15147) - Small resolver cleanups (rust-lang/cargo#15040) - feat: add `cargo pkgid` support for cargo-script (rust-lang/cargo#14961) - Suggest similar feature names on CLI (rust-lang/cargo#15133) - fix: Don't use "did you mean" in errors (rust-lang/cargo#15138) - Fix changelog link (rust-lang/cargo#15142) - chore(deps): update rust crate rand to 0.9.0 (rust-lang/cargo#15129) - Remove the original changelog (rust-lang/cargo#15123) - chore(deps): update rust crate gix to 0.70.0 (rust-lang/cargo#15128) - allow windows reserved names in CI (rust-lang/cargo#15135) - removed a word that was repeated (rust-lang/cargo#15136)
2025-02-08transmutability: fix ICE when passing wrong ADT to ASSUMELukas Markeffsky-18/+45