305750 Commits

Author SHA1 Message Date
Zalathar
2552deb9cd Use LLVMDIBuilderCreateUnionType 2025-09-17 12:28:08 +10:00
Zalathar
5419896111 Use LLVMDIBuilderCreateSubroutineType 2025-09-17 12:28:08 +10:00
Camille Gillot
eddd755f28 Bless ui. 2025-09-16 22:58:54 +00:00
Camille Gillot
fe3a784ef2 Do not renumber resume local. 2025-09-16 22:50:32 +00:00
Camille Gillot
40d879a47f Add test. 2025-09-16 22:50:32 +00:00
Camille Gillot
de73af9ec4 Add test. 2025-09-16 22:44:35 +00:00
Camille Gillot
4516fee8cb Remove Rvalue::Len. 2025-09-16 22:23:19 +00:00
Camille Gillot
f018b46558 Update docs. 2025-09-16 22:23:19 +00:00
Camille Gillot
53b91ea87f Remove Rvalue::Len. 2025-09-16 22:23:19 +00:00
galileocap
19e5286c80
Fix unnecessary_unwrap false negative when unwrapping a known value inside a macro call
Fixes https://github.com/rust-lang/rust-clippy/issues/12295

changelog: [`unnecessary_unwrap`]: Fix false negative when unwrapping a known value inside a macro call
2025-09-16 19:20:39 -03:00
Camille GILLOT
44c1a00a2f Enable DestinationPropagation by default. 2025-09-16 22:08:02 +00:00
bors
3f1552a273 Auto merge of #146650 - matthiaskrgr:rollup-rjrklz9, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#146442 (Display ?Sized, const, and lifetime parameters in trait item suggestions across a crate boundary)
 - rust-lang/rust#146474 (Improve `core::ascii` coverage)
 - rust-lang/rust#146605 (Bump rustfix 0.8.1 -> 0.8.7)
 - rust-lang/rust#146611 (bootstrap: emit hint if a config key is used in the wrong section)
 - rust-lang/rust#146618 (Do not run ui test if options specific to LLVM are used when another codegen backend is used)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-16 21:53:05 +00:00
Weihang Lo
a4e8d6d79d
Update cargo submodule 2025-09-16 17:25:31 -04:00
T
d81872a971 add Readme.md to tidy
update Readme

add info about githooks and bootstrap.toml

add info about config and remove linting specific files

add link to rustc-dev-guide
2025-09-16 21:17:14 +00:00
Samuel Tardieu
b79a4bfad6 Do not use git -C dir
Older versions of git (≤ 1.8.5) do not support the `-C dir` global
option. Use the `cwd` optional argument when using Python's
`subprocess` functionality instead.
2025-09-16 21:53:42 +02:00
Josh Stone
88bef49646 Update the FIXME comments in the generic three_way_compare 2025-09-16 11:49:21 -07:00
Josh Stone
e54602c5bb Merge similar output checks in assembly-llvm/x86_64-cmp 2025-09-16 11:49:21 -07:00
Josh Stone
580b4891aa Update the minimum external LLVM to 20 2025-09-16 11:49:20 -07:00
bors
a9d0a6f155 Auto merge of #138271 - mu001999-contrib:fix-138234, r=jackh726
Keep space if arg does not follow punctuation when lint unused parens

Fixes rust-lang/rust#138234

If the arg follows punctuation, still pass `left_pos` with `None` and no space will be added, else then pass `left_pos` with `Some(arg.span.lo())`, so that we can add the space as expected.

And `emit_unused_delims` can make sure no more space will be added if the expr follows space.

---

Edited:

Directly use the `value_span` to check whether the expr removed parens will follow identifier or be followed by identifier.
2025-09-16 18:43:49 +00:00
Matthias Krüger
cf035527ac
Rollup merge of #146618 - GuillaumeGomez:backend-run-llvm-options, r=kobzol
Do not run ui test if options specific to LLVM are used when another codegen backend is used

Based on errors in https://github.com/rust-lang/rust/pull/146414, some tests with LLVM-specific options are run when another codegen is actually the one used.

This PR ignores these tests in such cases now to prevent this situation.

r? `@kobzol`
2025-09-16 20:42:24 +02:00
Matthias Krüger
d1ed4f4238
Rollup merge of #146611 - lolbinarycat:bootstrap-toml-wrong-section-diagnostic, r=Kobzol
bootstrap: emit hint if a config key is used in the wrong section

based on discussion on rust-lang/rust#146591

now, if the user puts `build.download-rustc` in `bootstrap.toml`, they'll get a diagnostic:
``hint: try moving `download-rustc` to the `rust` section``

and if they nest things too much (`rust.rust.download-rustc`):
``hint: section name `rust` used as a key within a section``

if they specify a top-level key within a section (`rust.profile`):
``hint: try using `profile` as a top level key``

r? `@Kobzol`
2025-09-16 20:42:24 +02:00
Matthias Krüger
b1a724626b
Rollup merge of #146605 - jyn514:update-rustfix, r=nnethercote
Bump rustfix 0.8.1 -> 0.8.7

This commit can be replicated by running `cargo update -p rustfix --precise 0.8.7 && x test ui --bless`.

---

The reasons this affects UI tests is as follows:
- The UI test suite runs rustc with `-Z deduplicate-diagnostics=no --error-format=json`, which means that rustc emits multiple errors containing identical suggestions. That caused the weird-looking code that had multiple `X: Copy` suggestions.
- Those suggestions are interpreted not by rustc itself, but by the `rustfix` library, maintained by cargo but published as a separate crates.io library and used by compiletest.
- Sometime between rustfix 0.8.1 and 0.8.7 (probably in rust-lang/cargo#14747, but it's hard to tell because rustfix's versioning doesn't match cargo's), rustfix got smarter and stopped applying duplicate suggestions.

Update rustfix to match cargo's behavior. Ideally, we would always share a version of rustfix between cargo and rustc (perhaps with a path dependency?), to make sure we are testing the behavior we ship. But for now, just manually update it to match.

Note that the latest version of rustfix published to crates.io is 0.9.1, not 0.8.7. But 0.9.1 is not the version used in cargo, which is 0.9.3. Rather than trying to match versions exactly, I just updated rustfix to the latest in the 0.8 branch.
2025-09-16 20:42:23 +02:00
Matthias Krüger
f4a522d1f8
Rollup merge of #146474 - ferrocene:pvdrz/improve-ascii-coverage, r=Noratrieb
Improve `core::ascii` coverage

This PR improves the `core::ascii` coverage by adding a new test to `coretests`

r? `@workingjubilee`
2025-09-16 20:42:22 +02:00
Matthias Krüger
a811bb631a
Rollup merge of #146442 - Qelxiros:trait-suggestion-generics, r=BoxyUwU
Display ?Sized, const, and lifetime parameters in trait item suggestions across a crate boundary

context: rust-lang/rust#145929

This fixes the MetaSized issue and adds const generics and early bound lifetimes. Late bound lifetimes are harder because they aren't returned by `generics_of`. I'm going to look into it, but there's no guarantee I'll be successful.

Fixes https://github.com/rust-lang/rust/issues/146404.

r? `@BoxyUwu`
2025-09-16 20:42:22 +02:00
Esteban Küber
e9270e3cba Detect top-level ... in argument type
When writing something like the expression `|_: ...| {}`, we now detect the `...` during parsing explicitly instead of relying on the detection in `parse_ty_common` so that we don't talk about "nested `...` are not supported".

```
error: unexpected `...`
  --> $DIR/no-closure.rs:6:35
   |
LL | const F: extern "C" fn(...) = |_: ...| {};
   |                                   ^^^
   |
   = note: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list
```
2025-09-16 11:38:08 -07:00
Esteban Küber
8306a2f02e Reword note 2025-09-16 11:24:51 -07:00
Esteban Küber
ed85f9846d remove redundant test 2025-09-16 11:21:29 -07:00
Esteban Küber
c916e8886b fmt 2025-09-16 11:08:43 -07:00
binarycat
9c423796bb bootstrap: emit hint if a config key is used in the wrong section 2025-09-16 12:39:49 -05:00
Philipp Krones
49ae1d415d
Changelog for Clippy 1.90 🍂 (#15670)
Violets are red,
Roses are blue,
As September leaves turn,
Let what's old become new.

-----

Meet George @DaBs's little (de)bugger, our winner at
rust-lang/rust-clippy#15375

![cat](https://github.com/user-attachments/assets/ae5877bb-4a5e-4490-aea6-de961627f097)

-----

Cats for the next release can be traditionally nominated in the
comments.
Thanks @blyxyas for organizing the previous votes.

changelog: none

r? flip1995
2025-09-16 17:25:44 +00:00
Tawan Muadmuenwai
6912631d3e
Add span for struct tail recursion limit error 2025-09-16 23:04:59 +07:00
Guillaume Gomez
a535042e80 Do not run ui test if options specific to llvm are used when another codegen backend is used 2025-09-16 17:47:43 +02:00
Christian Poveda
e652f97c6b
Improve core::ascii coverage 2025-09-16 10:05:40 -05:00
Jeremy Smart
1a1510816a
handle const generics, ?Sized, early bound lifetimes 2025-09-16 10:17:25 -04:00
Mu001999
9991ec282f Keep space if expr follows identifier when lint unused parens 2025-09-16 11:31:59 +00:00
Marijn Schouten
c89b6a955c Iterator repeat: no infinite loop for last and count 2025-09-16 10:09:20 +00:00
Haidong Zhang
929c9335dd Add parallel-frontend-threads to bootstrap.toml and enable multi-threaded parallel compilation 2025-09-16 17:53:29 +08:00
bors
eec6bd9d69 Auto merge of #146516 - cjgillot:dest-prop-aggregate, r=Amanieu
DestinationPropagation: avoid creating overlapping assignments.

r? `@Amanieu`

Fixes https://github.com/rust-lang/rust/issues/146383
2025-09-16 09:18:32 +00:00
Cameron Steffen
d66fb4910f Suggest removing Box::new 2025-09-16 04:22:50 -04:00
bors
8a1b39995e Auto merge of #146614 - Zalathar:rollup-hcxvdi1, r=Zalathar
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#145095 (Migrate `UnsizedConstParamTy`  to unstable impl of `ConstParamTy_`)
 - rust-lang/rust#145960 (Split `FnCtxt::report_args_error` into subfunctions)
 - rust-lang/rust#146402 (interpret: fix overlapping aggregate initialization)
 - rust-lang/rust#146466 (llvm-wrapper: other cleanup)
 - rust-lang/rust#146574 (compiletest: Enable new-output-capture by default)
 - rust-lang/rust#146599 (replace some `#[const_trait]` with `const trait`)
 - rust-lang/rust#146601 (compiletest: Make `./x test --test-args ...` work again)
 - rust-lang/rust#146608 (improve internal bootstrap docs)
 - rust-lang/rust#146609 (bootstrap: lower verbosity of cargo to one less than bootstrap's)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-16 04:26:18 +00:00
Camille Gillot
d58061e613 Restrict simple assignment condition. 2025-09-16 01:22:10 +00:00
Jason Newcomb
2a6197e375
Recognize canonical ? pattern with Result (#15680)
This recognizes the following expression as being equivalent to the
question mark:

```rust
match x {
    Ok(v) => v,
    Err(e) => return Err(e.into()), // or `Into::into(x)` or `<T as Into<U>>::into(x)`
}
```

Fixes rust-lang/rust-clippy#15679

changelog: [`question_mark`]: recognizes a match with an early return
with a call to `.into()` as possibly equivalent to a question mark
2025-09-16 01:08:21 +00:00
Stuart Cook
f0e8c2fb6f
Rollup merge of #146609 - lolbinarycat:bootstrap-less-verbose-cargo, r=Kobzol
bootstrap: lower verbosity of cargo to one less than bootstrap's

the main thing this does is eliminate the "Fresh ..." output when `--verbose` is only passed once.

r? `@Kobzol`
2025-09-16 10:25:44 +10:00
Stuart Cook
cc315a8fba
Rollup merge of #146608 - lolbinarycat:bootstrap-readme, r=Kobzol
improve internal bootstrap docs

Mainly focused on making it easier to figure out how tools get built without having to read the `bootstrap_tool!` macro, but also added some subdirs of `build/` to the readme.
2025-09-16 10:25:43 +10:00
Stuart Cook
7cad097408
Rollup merge of #146601 - Enselic:fix-test-args, r=Mark-Simulacrum
compiletest: Make `./x test --test-args ...` work again

It accidentally broke with  https://github.com/rust-lang/rust/pull/146501. The intention of that PR was to keep existing behavior if `--exact` is not used, but it had a bug. This PR fixes that bug.
2025-09-16 10:25:42 +10:00
Stuart Cook
f3c395b118
Rollup merge of #146599 - npmccallum:cleanup, r=fmease
replace some `#[const_trait]` with `const trait`
2025-09-16 10:25:42 +10:00
Stuart Cook
336e45e041
Rollup merge of #146574 - Zalathar:capture, r=jieyouxu
compiletest: Enable new-output-capture by default

The new output-capture implementation was added in rust-lang/rust#146119, but was disabled by default and required opt-in.

Since then, I haven't encountered any problems in my own testing/usage, and I haven't heard any problem reports from other contributors who might have opted in.

It's unlikely that more opt-in testing will help, so the next step is to enable new-output-capture by default and see if anyone complains. (Hopefully nobody!)

If needed, the new default can be overridden (for now) by setting environment variable `COMPILETEST_NEW_OUTPUT_CAPTURE=off`. Please file an issue (or let me know) if anyone finds a reason to do this.

r? jieyouxu
2025-09-16 10:25:41 +10:00
Stuart Cook
9eaf3c8864
Rollup merge of #146466 - klensy:llvm-wrapper-c, r=cuviper
llvm-wrapper: other cleanup

Cleanup few things around llvm-wrapper:

First commit removes unused macro, added back in https://github.com/rust-lang/rust/pull/31709 it was used in `LLVMRustHasFeature`; second removes unused function, third one removes `jsbackend` llvm component - this is looks like remnants of some removed backend?
2025-09-16 10:25:40 +10:00
Stuart Cook
f162d11351
Rollup merge of #146402 - RalfJung:aggregate-init, r=saethlin
interpret: fix overlapping aggregate initialization

This fixes the problem pointed out by ````@saethlin```` in https://github.com/rust-lang/rust/issues/146383#issuecomment-3273224645.

Also clarify when exactly current de-facto MIR semantics allow overlap of the LHS and RHS in an assignment.
2025-09-16 10:25:40 +10:00
Stuart Cook
85249d5571
Rollup merge of #145960 - scrabsha:push-kskuprrtmnky, r=jdonszelmann
Split `FnCtxt::report_args_error` into subfunctions
2025-09-16 10:25:39 +10:00