Commit Graph

303456 Commits

Author SHA1 Message Date
Jonathan Brouwer
c7f5ddc098 Changes to diagnostics 2025-07-15 09:21:27 +02:00
Jonathan Brouwer
6133c676d7 Define attribute parser & config evaluator 2025-07-15 09:21:26 +02:00
xizheyin
a74a28493a Add tests for UB check in set_len, from_raw_parts_in, from_parts_in
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-15 15:12:24 +08:00
Jason Newcomb
0bf4d5a617 fix suggestion causes error of needless_for_each (#15262)
Fixes: rust-lang/rust-clippy#15256

changelog: fix suggestion causes error of [`needless_for_each`] when the
`body.value` comes from macro expansion.
2025-07-15 07:06:10 +00:00
Jonathan Brouwer
30f4a9cd53 Move cfg -> cfg_old 2025-07-15 09:01:03 +02:00
Jonathan Brouwer
38dd6f5206 Allow Early stage to emit errors 2025-07-15 09:01:03 +02:00
Jonathan Brouwer
a14baf1e56 Define datastructures for #[cfg] attribute, move StrippedCfgItem 2025-07-15 09:01:00 +02:00
Ralf Jung
5453326ae0 Merge pull request #4468 from rust-lang/rustup-2025-07-15
Automatic Rustup
2025-07-15 06:08:44 +00:00
The Miri Cronjob Bot
7823aac2fe Merge from rustc 2025-07-15 05:07:09 +00:00
The Miri Cronjob Bot
f7da0212af Merge from rustc 2025-07-15 05:07:09 +00:00
The Miri Cronjob Bot
a9a5b33c2d Preparing for merge from rustc 2025-07-15 04:59:27 +00:00
Karan Janthe
80224c3e88 test: Add UI tests for testing type analysis autodiff
Signed-off-by: Karan Janthe <karanjanthe@gmail.com>
2025-07-15 04:17:29 +00:00
xizheyin
ed88af2163 Recover and suggest use ; to construct array type
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-07-15 12:00:46 +08:00
Boot0x7c00
c20faa0512 fix needless_for_each suggests wrongly for macros 2025-07-15 03:02:06 +00:00
Michael Howell
bfc4d17864 Add more tests, clean up code 2025-07-14 17:19:23 -07:00
Amanieu d'Antras
2aaa584094 Merge pull request #1872 from folkertdev/aarch64-horizontal-add
`aarch64`: use `intrinsics::simd` for horizontal add and `abs`
2025-07-15 00:19:05 +00:00
bors
7f2065a4ba Auto merge of #142885 - a1phyr:borrowed_cursor_to_buf, r=Mark-Simulacrum
core: Add `BorrowedCursor::with_unfilled_buf`

Implementation of https://github.com/rust-lang/libs-team/issues/367.

This mainly adds `BorrowedCursor::with_unfilled_buf`, with enables using the unfilled part of a cursor as a `BorrowedBuf`.

Note that unlike the ACP, `BorrowedCursor::unfilled_buf` was moved to a `From` conversion. This is more consistent with other ways of creating a `BorrowedBuf` and hides a bit this conversion that requires unsafe code to be used correctly.

Cc rust-lang/rust#78485 rust-lang/rust#117693
2025-07-14 23:45:18 +00:00
Folkert de Vries
48c33b7748 aarch64: implement vabs using instrinsics::simd 2025-07-15 01:36:20 +02:00
Amanieu d'Antras
1a8c5324f0 Merge pull request #1869 from folkertdev/s390x-use-rounding-intrinsic
`s390x`: document the different rounding flavors
2025-07-14 23:28:37 +00:00
Eric Huss
02dc14b25c Update mdbook to 0.4.52
Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0452

This primarily picks up a few fixes.
2025-07-14 16:28:32 -07:00
Amanieu d'Antras
7d10ff1a18 Merge pull request #1837 from heiher/loong32
loongarch: Add basic support for LoongArch32
2025-07-14 23:27:09 +00:00
Amanieu d'Antras
dd64d860be Merge pull request #1871 from folkertdev/aarch64-float-min-max
`aarch64`: use more of `intrinsics::simd` for min/max
2025-07-14 23:24:32 +00:00
Amanieu d'Antras
63cc37c578 Merge pull request #1870 from Kobzol/rustc-pull-ci
Add rustc-pull CI automation workflow
2025-07-14 23:23:21 +00:00
Amanieu d'Antras
decddf758a Merge pull request #1852 from folkertdev/optimize-intrinsic-test
`intrinsic-test`: use runner also for rust
2025-07-14 23:18:04 +00:00
Manuel Drehwald
39f269c305 Merge pull request #2497 from rust-lang/tshepang-git-clone
tweak some git clone commands
2025-07-14 15:53:33 -07:00
Samuel Tardieu
ba8da7a8e8 useless_conversion: move all the impl to the same lint pass (#15274)
Needed to split the lints crate.

changelog: none
2025-07-14 22:33:14 +00:00
Chayim Refael Friedman
1d3ea1fd6e Infer lifetimes for GATs in expression/pattern position
We should not only in type position.
2025-07-15 01:15:33 +03:00
Jonathan Brouwer
f0d0afab8e Port #[pointee] to the new attribute parsing infrastructure
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-14 23:16:31 +02:00
Folkert de Vries
d0153f5872 update cfg_select! documentation
and make internal terminology consistent

Co-authored-by: Travis Cross <tc@traviscross.com>
2025-07-14 22:29:28 +02:00
Paul Murphy
9bdd3b0ee6 Don't always panic if WASI_SDK_PATH is not set when detecting compilers
They are not always needed when building std, as is the case when
packaging on Fedora. Panic if building from CI, but warn otherwise.
2025-07-14 15:05:59 -05:00
bors
f4b827abeb Auto merge of #143745 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`

Cargo.lock update due to `ui_test` bump and restructure.
2025-07-14 19:53:18 +00:00
bors
a001497644 Auto merge of #143745 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`

Cargo.lock update due to `ui_test` bump and restructure.
2025-07-14 19:53:18 +00:00
rustbot
1669ba055c Update books 2025-07-14 19:01:40 +02:00
Jieyou Xu
0a899e0e8a Update triagebot autolabel 2025-07-15 00:46:34 +08:00
Jieyou Xu
186afbb911 Remove mentions of ./x suggest and suggest-tests in rustc-dev-guide 2025-07-15 00:46:34 +08:00
Jieyou Xu
647c051fec Regenerate completions after removing ./x suggest 2025-07-15 00:46:34 +08:00
Jieyou Xu
91d064b442 Remove current implementation of ./x suggest
This is quite a bit of implementation complexity, yet it is quite
broken, and we don't have the maintenance bandwidth to address.

Remove the current implementation if only to reduce bootstrap's
implementation complexity; the `suggest` flow comes with its own set of
hacks.
2025-07-15 00:46:33 +08:00
Jieyou Xu
904273c58e Register change tracker warning for removal of ./x suggest 2025-07-15 00:46:31 +08:00
bors
aa51a9b094 Auto merge of #143934 - samueltardieu:rollup-w3iw614, r=samueltardieu
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#141809 (Don't call WSACleanup on process exit)
 - rust-lang/rust#143710 (Updates to random number generation APIs)
 - rust-lang/rust#143848 (Rename `stable_mir` and `rustc_smir`)
 - rust-lang/rust#143855 (Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing)
 - rust-lang/rust#143868 (warn on align on fields to avoid breaking changes)
 - rust-lang/rust#143870 ([COMPILETEST-UNTANGLE 6/N] Use `TestSuite` enum instead of stringly-typed test suites)
 - rust-lang/rust#143901 (Region constraint nits)
 - rust-lang/rust#143903 (Fix typos in documentation files)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-07-14 16:44:05 +00:00
Jens Reidel
ae1b1b4f8a tests: Fix duplicated-path-in-error fail with musl
musl's dlopen returns a different error than glibc, which contains the
name of the file. This would cause the test to fail, since the filename
would appear twice in the output (once in the error from rustc, once in
the error message from musl). Split the expected test outputs for the
different libc implementations.

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2025-07-14 18:37:49 +02:00
Ada Alakbarova
1b8d65ed29 rustc_type_ir/walk: move docstring to TypeWalker itself
having it on the impl block is a bit weird imo
2025-07-14 18:14:02 +02:00
Samuel Tardieu
9b260f6ccf Rollup merge of #143903 - vtjl10:master, r=jieyouxu
Fix typos in documentation files

## Summary
Fix minor typos in documentation files to improve readability.

## Changes
- **tests/mir-opt/pre-codegen/README.md**: Fix typo `condiguration` → `configuration`
- **tests/ui/SUMMARY.md**: Fix typo in RFC link URL (`namepsace ` → `namespace`)

## Type of Change
- [x] Documentation update
- [x] Bug fix (typo correction)
2025-07-14 18:05:47 +02:00
Samuel Tardieu
8fcef5674a Rollup merge of #143901 - compiler-errors:region-constraint-nits, r=lcnr
Region constraint nits

Couple miscellaneous region constraints that have a bit to do with rust-lang/rust#143545 but stand on their own.
2025-07-14 18:05:47 +02:00
Samuel Tardieu
084bd581b7 Rollup merge of #143870 - jieyouxu:compiletest-maintenance-6, r=Kobzol
[COMPILETEST-UNTANGLE 6/N] Use `TestSuite` enum instead of stringly-typed test suites

This is part of a patch series to untangle `compiletest` to hopefully nudge it towards being more maintainable.

This PR should contain no functional changes.
2025-07-14 18:05:46 +02:00
Samuel Tardieu
16b3f47658 Rollup merge of #143868 - jdonszelmann:fix-align-on-fields, r=workingjubilee
warn on align on fields to avoid breaking changes

r? `@workingjubilee`
2025-07-14 18:05:45 +02:00
Samuel Tardieu
bbda0c9fb5 Rollup merge of #143855 - JonathanBrouwer:omit_gdb_pretty_printer_section, r=jdonszelmann
Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing

Ports `#[omit_gdb_pretty_printer_section]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163

r? ```@jdonszelmann```
2025-07-14 18:05:45 +02:00
Samuel Tardieu
c59bc44ca9 Rollup merge of #143848 - makai410:smir-rename, r=oli-obk
Rename `stable_mir` and `rustc_smir`

This PR only renames the two crate names.

There is no doubt that we want to rename `stable_mir` to `rustc_public`, while it hasn't been discussed yet that what the new name for `rustc_smir` should be.

This PR proposes a new name for `rustc_smir`, that is `rustc_public_shim`, since `rustc_smir` now is mostly a proxy to do calls to rustc queries and the public API of rustc that is invoked by the `rustc_public` crate.

However, I don't think that name is good enough. I hope there would be a way better name.

r? `@oli-obk`
2025-07-14 18:05:44 +02:00
Samuel Tardieu
30b46e3f8c Rollup merge of #143710 - joshtriplett:random-updates, r=joshtriplett
Updates to random number generation APIs

Updates based on discussions about random number generation.

- Add comment on `RandomSource::fill_bytes` about multiple calls, to allow
  efficient implementations for random sources that generate a word at a time.

- Drop the `Random` trait in favor of `Distribution<T>`, which will let people
  make calls like random(1..=6), and which allows for future expansion to
  non-uniform distributions, as well as floating-point. (For now, this is only
  implemented for `RangeFull`, to get the interface in place. Subsequent PRs
  will implement it for other range types.)
2025-07-14 18:05:44 +02:00
Samuel Tardieu
74b5ac5c15 Rollup merge of #141809 - ChrisDenton:no-cleaup, r=jhpratt
Don't call WSACleanup on process exit

This isn't necessary as cleanup will happen when the process exits regardless.

fixes rust-lang/rust#141799
2025-07-14 18:05:43 +02:00
Jason Newcomb
7796773d3e useless_conversion: move all the impl to the same lint pass 2025-07-14 12:05:07 -04:00