Commit graph

306312 commits

Author SHA1 Message Date
The rustc-josh-sync Cronjob Bot
f54139aa31 Prepare for merging from rust-lang/rust
This updates the rust-version file to 4fa824bb78.
2025-10-06 04:13:15 +00:00
Manuel Drehwald
bd975777a2
Merge pull request #2603 from rust-lang/autodiff-updates
update libEnzyme file name, and add missing strict-aliasing flag
2025-10-05 01:40:12 -04:00
Manuel Drehwald
765e2fe6ee Add potential instability warning 2025-10-05 01:38:29 -04:00
Manuel Drehwald
a175921d5e update libEnzyme file name, and add missing strict-aliasing flag 2025-10-04 23:52:33 -04:00
许杰友 Jieyou Xu (Joe)
3f6f94e251
Merge pull request #2599 from rust-lang/tshepang-patch-5 2025-10-04 16:04:25 +08:00
Tshepang Mbambo
d0417dd45f
Merge pull request #2601 from rust-lang/tshepang-patch-2
cg_gcc.md: add missing quote
2025-10-03 15:16:22 +02:00
Tshepang Mbambo
74caed9a45
cg_gcc.md: add missing quote 2025-10-03 15:15:45 +02:00
Marco Ieni
ce830e67b4
Merge pull request #2570 from rust-lang/tshepang/branch-rename
rename primary git branch
2025-09-30 09:24:58 +02:00
nora
7e65b095c4
Merge pull request #2598 from rust-lang/tshepang-patch-2
how-to-build-and-run.md: replace "rm build" with "x clean --all"
2025-09-29 21:29:53 +02:00
Tshepang Mbambo
eaeca96778 how-to-build-and-run.md: update "building compiler" section 2025-09-29 18:58:03 +02:00
Tshepang Mbambo
92e65dc4d4
how-to-build-and-run.md: replace "rm build" with "x clean --all" 2025-09-29 18:39:39 +02:00
Guillaume Gomez
370576b4a4
Merge pull request #2562 from ali90h/rustdoc-ci-frontends-note
Document rustdoc frontend CI checks
2025-09-24 10:52:29 +02:00
许杰友 Jieyou Xu (Joe)
aadaafa111
Merge pull request #2597 from rust-lang/tshepang-patch-2
compiler-team.md: remove obsolete membership level
2025-09-24 08:48:38 +08:00
Tshepang Mbambo
88f954453f
compiler-team.md: remove obsolete membership level
There used to be compiler team and compiler-contributor team, and those have since been collapsed into 1 team.
2025-09-22 20:45:37 +02:00
Tshepang Mbambo
70f3768fb8
Merge pull request #2593 from rust-lang/tshepang/testing-with-ci
various improvements resulting from reading Testing with CI
2025-09-22 16:33:40 +02:00
Tshepang Mbambo
1e2594f94f various improvements resulting from reading Testing with CI 2025-09-22 16:32:50 +02:00
Tshepang Mbambo
45f891d832
Merge pull request #2596 from rust-lang/tshepang/sembr
reduce overlong lines
2025-09-22 16:27:31 +02:00
Tshepang Mbambo
62b2bd5809 reduce overlong lines 2025-09-22 16:26:27 +02:00
Tshepang Mbambo
391a2ea868
Merge pull request #2595 from rust-lang/rustc-pull
Rustc pull update
2025-09-22 16:18:39 +02:00
The rustc-josh-sync Cronjob Bot
c3d30743a4 Merge ref '9f32ccf35f' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 9f32ccf35f
Filtered ref: 87b13773969f65eec6762cfe4194954e7513f59b
Upstream diff: 2f3f27bf79...9f32ccf35f

This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-22 04:19:52 +00:00
The rustc-josh-sync Cronjob Bot
5658b39397 Prepare for merging from rust-lang/rust
This updates the rust-version file to 9f32ccf35f.
2025-09-22 04:13:50 +00:00
bors
9f32ccf35f Auto merge of #146862 - matthiaskrgr:rollup-1zqootr, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#143857 (Port #[macro_export] to the new attribute parsing infrastructure)
 - rust-lang/rust#146486 (Improve `core::sync::atomic` coverage)
 - rust-lang/rust#146606 (ci: x86_64-gnu-tools: Add `--test-args` regression test)
 - rust-lang/rust#146639 (std: merge definitions of `StdioPipes`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-21 20:33:36 +00:00
Matthias Krüger
adfc111fff
Rollup merge of #146639 - joboet:shared-stdiopipes, r=Mark-Simulacrum
std: merge definitions of `StdioPipes`

All platforms define this structure the same way, so we can just put it in the `process` module directly.
2025-09-21 22:20:27 +02:00
Matthias Krüger
af315d3027
Rollup merge of #146606 - Enselic:test-test-args, r=Mark-Simulacrum
ci: x86_64-gnu-tools: Add `--test-args` regression test

See https://github.com/rust-lang/rust/pull/146601#issuecomment-3293179561

r? ``@Mark-Simulacrum``
2025-09-21 22:20:26 +02:00
Matthias Krüger
c0f5eefa27
Rollup merge of #146486 - ferrocene:pvdrz/improve-atomic-coverage, r=ibraheemdev
Improve `core::sync::atomic` coverage

This PR improves the `core::sync::atomic` coverage by adding new tests to `coretests`.

r? libs
2025-09-21 22:20:26 +02:00
Matthias Krüger
7148a4f543
Rollup merge of #143857 - Periodic1911:macro-export, r=jdonszelmann
Port #[macro_export] to the new attribute parsing infrastructure

Ports macro_export to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197

r? ``@oli-obk``

cc ``@JonathanBrouwer`` ``@jdonszelmann``
2025-09-21 22:20:25 +02:00
joboet
87a00f67ba
std: merge definitions of StdioPipes
All platforms define this structure the same way, so we can just put it in the `process` module directly.
2025-09-21 19:45:46 +02:00
Tshepang Mbambo
a11333a996
Merge pull request #2594 from cammeresi/spelling-20250921
Correct a misspelling of RUSTC_LOG
2025-09-21 19:39:05 +02:00
Sidney Cammeresi
d887c570a0
Correct a misspelling of RUSTC_LOG 2025-09-21 09:31:26 -07:00
bors
7e4b8d702f Auto merge of #146659 - cjgillot:impossible-taint, r=oli-obk
Consider errors in MIR as impossible predicates to empty the body.

The ICEs come from elaborating drops or performing state transform in MIR bodies that fail typeck or borrowck.

If the body is tainted, replace it with `unreachable`.

Fixes https://github.com/rust-lang/rust/issues/122630
Fixes https://github.com/rust-lang/rust/issues/122904
Fixes https://github.com/rust-lang/rust/issues/125185
Fixes https://github.com/rust-lang/rust/issues/139556
2025-09-21 16:28:12 +00:00
Jonathan Brouwer
f7fa83ec62
Changes to uitests for macro_export port
Co-authored-by: Anne Stijns <anstijns@gmail.com>
2025-09-21 10:42:47 -04:00
Jonathan Brouwer
6abcadc235
Port #[macro_export] to the new attribute parsing infrastructure
Co-authored-by: Anne Stijns <anstijns@gmail.com>
2025-09-21 10:42:47 -04:00
bors
6710835ae7 Auto merge of #146592 - Kobzol:tidy-diag, r=jieyouxu
Implement a simple diagnostic system for tidy

In https://github.com/rust-lang/rust/pull/146316 and https://github.com/rust-lang/rust/pull/146580, contributors independently wanted to reduce the verbose output of tidy. But before, the output was quite ad-hoc, so it was not easy to control it.

In this PR, I implemented a simple diagnostic system for tidy, which allows us to:
1) Only print certain information in verbose mode (`-v`)
2) Associate each (error) output to a specific check, so that it is easier to find out what exactly has failed and which check you might want to examine (not fully done, there are some random `println`s left, but most output should be scoped to a specific check)
3) Print output with colors, based on the message level (message, warning, error)
4) Show the start/end execution of each check in verbose mode, for better progress indication

Failure output:
<img width="1134" height="157" alt="image" src="https://github.com/user-attachments/assets/578a9302-e1c2-47e5-9370-a3556c49d9fc" />

Success output:
<img width="388" height="113" alt="image" src="https://github.com/user-attachments/assets/cf27faf8-3d8b-49e3-88d0-fac27a9c36a8" />

Verbose output (shortened):
<img width="380" height="158" alt="image" src="https://github.com/user-attachments/assets/ce7102b8-c2f3-42a8-a2ec-ca30389be91e" />

CC `@nnethercote` `@RalfJung` `@GuillaumeGomez`

The first two commits and the last commit are interesting, the rest is just mechanical port of the code from `bad: &mut bool` to `DiagCtx` and `RunningCheck`.

The `extra_checks` check could be further split, but I'd leave that for another PR.

r? `@jieyouxu`
2025-09-21 13:21:30 +00:00
Jakub Beránek
4c208f5c64
Implement output of colored messages with optional check context 2025-09-21 15:15:31 +02:00
Jakub Beránek
352fa3960a
Migrate the remaining tidy checks to diagnostics 2025-09-21 15:15:31 +02:00
Jakub Beránek
c36faff900
Add CheckId, migrate the alphabetical check to diagnostics 2025-09-21 15:13:01 +02:00
Jakub Beránek
b0010dd5ae
Add diagnostics context and migrate the style check to it 2025-09-21 15:13:01 +02:00
bors
1d23da6b73 Auto merge of #146779 - GuillaumeGomez:gcc-ignore-test_ui_abi, r=Kobzol,jieyouxu
Ignore tests in `tests/ui/abi` for the GCC backend

Needed for https://github.com/rust-lang/rust/pull/146414.

Currently we ignore them in the GCC backend and until this situation changes, it'll block rust-lang/rust#146414.

r? `@Kobzol`
2025-09-21 07:52:56 +00:00
bors
dfa22235d8 Auto merge of #146830 - Zalathar:rollup-lj8jfok, r=Zalathar
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#140983 (Improve doc of some methods that take ranges)
 - rust-lang/rust#144091 (Stabilize `new_zeroed_alloc`)
 - rust-lang/rust#145664 (Stabilize `std::panic::Location::file_as_c_str`)
 - rust-lang/rust#146551 (fix issue with `cmse-nonsecure-entry` ABI being both async and c-variadic)
 - rust-lang/rust#146744 (Deref related cleanups in ref_prop)
 - rust-lang/rust#146793 (naked_asm: emit a label starting with `func_end`)
 - rust-lang/rust#146820 (Add unstable attribute to BTreeMap-related allocator generics)
 - rust-lang/rust#146822 (Fix old typo in lang_start_internal comment)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-21 04:45:12 +00:00
Stuart Cook
5224279572
Rollup merge of #146822 - saethlin:bbbbbstd, r=Noratrieb
Fix old typo in lang_start_internal comment

Noticed this when reading the rt cleanup code; the typo was introduced during a mass port of libstd to std in comments.
2025-09-21 14:42:37 +10:00
Stuart Cook
be395723b5
Rollup merge of #146820 - cammeresi:alloc-20250919, r=tgross35
Add unstable attribute to BTreeMap-related allocator generics

Although these types aren't directly constructable externally, since they're pub, I think this omission was an oversight.

r? libs-api
2025-09-21 14:42:36 +10:00
Stuart Cook
92ea947c78
Rollup merge of #146793 - folkertdev:naked-asm-func-end, r=Amanieu
naked_asm: emit a label starting with `func_end`

The `cargo asm` tool (`cargo install cargo-show-asm`) pattern matches on such labels to figure out where functions end: normal functions generated by LLVM always do have such a label. We don't guarantee that naked functions emit such a label, but having `cargo asm` work is convenient.

be45f67454/src/asm/statements.rs (L897-L901)

To make the label name unique it's suffixed with the name of the current symbol.

r? ```@Amanieu```
2025-09-21 14:42:35 +10:00
Stuart Cook
5c1c47925e
Rollup merge of #146744 - beepster4096:derefs_in_ref_prop, r=cjgillot
Deref related cleanups in ref_prop

Cherry picked from rust-lang/rust#146710

r? cjgillot
2025-09-21 14:42:35 +10:00
Stuart Cook
6333a8b9fe
Rollup merge of #146551 - folkertdev:cmse-entry-c-variadic, r=workingjubilee
fix issue with `cmse-nonsecure-entry` ABI being both async and c-variadic

tracking issue: https://github.com/rust-lang/rust/issues/75835
fixes https://github.com/rust-lang/rust/issues/132142

An `extern "cmse-nonsecure-entry"` function cannot be c-variadic (or, in any case, clang/LLVM does not support it, see  https://godbolt.org/z/MaPjzGcE1). So just stop looking at the type if we know it'll be invalid anyway.

I'm not entirely sure how to test this. The ICE is only possible on the `thumbv8m.main-none-eabi` and some related targets. I think using `minicore` is the most convenient, but use of `async` requires quite a long list of lang items to be present. Maybe we want that anyway though? On the other hand, it's extra `minicore` surface that might go out of date.

An alternative is `run-make`, that should work, but is much less convenient. See also [#t-compiler/help > &#96;async fn&#96; and &#96;minicore&#96;](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.60async.20fn.60.20and.20.60minicore.60/with/539427262).

r? `@ghost`
2025-09-21 14:42:34 +10:00
Stuart Cook
b0c55c8554
Rollup merge of #145664 - Darksonn:stab-file-with-nul, r=Mark-Simulacrum
Stabilize `std::panic::Location::file_as_c_str`

Closes: rust-lang/rust#141727

Nominating this for T-lang as per ```@traviscross```  https://github.com/rust-lang/rust/issues/141727#issuecomment-3201318429
2025-09-21 14:42:34 +10:00
Stuart Cook
7a5819d154
Rollup merge of #144091 - thaliaarchi:stabilize-new-zeroed, r=Mark-Simulacrum
Stabilize `new_zeroed_alloc`

The corresponding `new_uninit` and `new_uninit_slice` functions were stabilized in rust-lang/rust#129401, but the zeroed counterparts were left for later out of a [desire](https://github.com/rust-lang/rust/issues/63291#issuecomment-2161039756) to stabilize only the minimal set. These functions are straightforward mirrors of the uninit functions and well-established. Since no blockers or design questions have surfaced in the past year, I think it's time to stabilize them.

Tracking issue: rust-lang/rust#129396
2025-09-21 14:42:33 +10:00
Stuart Cook
d2533189de
Rollup merge of #140983 - tkr-sh:master, r=ibraheemdev
Improve doc of some methods that take ranges

Some methods that were taking some range in parameter were a bit inconsistent / unclear in the panic documentation.

Here is the recap:
- Replaced "start/end point" by "start/end bound" to be coherent with [`RangeBounds`](https://doc.rust-lang.org/stable/std/ops/trait.RangeBounds.html) naming (it's also easier to understand I think)
- Previously, it was written "_[...] or if the end point is greater than the length of [...]_", but this is not entirely true! Actually, you can have a start bound that is greater than the length, with an end bound that is unbounded and it will also panic. Therefore I think that "_[...] one of the range bound is bounded and greater than the length of [...]_" is better!
- `String` methods weren't mentionning that the method panics if `start_bound > end_bound` but it actually does! It uses `slice::range` which panics when `start > end`.  (https://doc.rust-lang.org/stable/src/alloc/string.rs.html#1932-1934, https://doc.rust-lang.org/stable/src/core/slice/index.rs.html#835-837).
You can also test it with:
```rs
struct MyRange;
impl std::ops::RangeBounds<usize> for MyRange {
    fn start_bound(&self) -> std::ops::Bound<&usize> {
        std::ops::Bound::Included(&3usize)
    }
    fn end_bound(&self) -> std::ops::Bound<&usize> {
        std::ops::Bound::Included(&1usize)
    }
}

fn main() {
    let mut s = String::from("I love Rust!");
    s.drain(MyRange); // panics!
}
```
2025-09-21 14:42:32 +10:00
Camille Gillot
3934fc9eb2 Consider errors in MIR as impossible predicates. 2025-09-21 03:26:21 +00:00
Ben Kimock
5c0cb3af59 Fix old typo in lang_start_internal comment 2025-09-20 18:27:33 -04:00
bors
dd7fda5700 Auto merge of #146812 - matthiaskrgr:rollup-aiap18m, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#144592 (generate list of all variants with `target_spec_enum`)
 - rust-lang/rust#146762 (Fix and provide instructions for running test suite on Apple simulators)
 - rust-lang/rust#146770 (fixes for numerous clippy warnings)
 - rust-lang/rust#146774 (Allow running `x <cmd> <path>` from a different directory)
 - rust-lang/rust#146800 (Fix unsupported `std::sys::thread` after move)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-20 16:33:23 +00:00