Commit Graph

167156 Commits

Author SHA1 Message Date
bors 4068bafedd Auto merge of #147913 - matthiaskrgr:rollup-lmm3dsh, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#147577 (Improve error message for ambiguous numeric types in closure parameters)
 - rust-lang/rust#147785 (fix incorrect line number when building trimmed multi-line suggestions)
 - rust-lang/rust#147814 (btree: some cleanup with less unsafe)
 - rust-lang/rust#147843 (Change the tidy license checker)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-20 16:40:43 +00:00
Matthias Krüger 2a6ac46f31 Rollup merge of #147843 - bjorn3:tidy_licenses, r=clubby789
Change the tidy license checker

This adds a bunch of licenses to the global list of allowed licenses that are at least as permissive as some other license in the list. In addition it adds another list for licenses that are allowed to be used by tools, but not by the runtime. All permissive licenses from the exception lists are added here. This makes it clearer what actual exceptions to our permissive licensing policy are and will hopefully make it a bit easier to review future changes to the list of licenses rather than just adding whatever license is necessary to the global list of allowed licenses or to the list of exceptions.
2025-10-20 18:21:34 +02:00
Stuart Cook 58345bb5eb Rollup merge of #147903 - Zalathar:edition, r=jieyouxu
compiletest: Store the selected edition in `TestProps`

While working on a larger overhaul of directive processing, I ran into difficulty with the `has_edition` local variable.

Storing the selected edition in `TestProps` should make it easier to extract parts of directive processing into independent handler functions, because the `//@ edition` handler won't need access to additional mutable state outside of `TestProps`.

We still automatically add the edition to `compile_flags`, because there is too much existing compiletest code relying on that behaviour.

r? jieyouxu
2025-10-20 22:30:56 +11:00
Stuart Cook 40475b4088 Rollup merge of #147898 - Zalathar:aux-props, r=jieyouxu
compiletest: Move `AuxProps` out of `EarlyProps`

The primary purpose of `EarlyProps` is to discover revisions, so that we can create a separate test structure for each revision.

Revisions can (and do) have different auxiliaries, and up-to-date checking is already done per-revision, so it makes more sense to perform up-to-date checks based on the current revisions's auxiliaries only.

r? jieyouxu
2025-10-20 22:30:55 +11:00
Stuart Cook d376a496f8 Rollup merge of #147888 - ZuseZ4:autodiff-with-download-ci, r=jieyouxu
enzyme/autodiff is compatible with download-ci=true

To my surprise autodiff just works out of the box with download-ci=true. Thanks to all the bootstrap people who over the past helped me to link properly against the sysroot LLVM, which seems to pay off here.
That also helps with enabling Rust in Enzyme CI, since CCache for some reason doesn't seem to cache LLVM correctly on their runners.

I verified that this works with
` ./configure --release-channel=nightly --enable-llvm-enzyme --enable-option-checking --disable-docs --enable-llvm-assertions --set llvm.download-ci-llvm=true`. However, shouldn't download-ci-llvm already be the default? Why do I still have to manually set it with this pr?

I tested it afterwards with
`./x.py test --stage 1 tests/codegen-llvm/autodiff`

r? bootstrap

closes https://github.com/rust-lang/rust/issues/147535
2025-10-20 22:30:54 +11:00
Zalathar e9bcded695 Store the selected edition in TestProps 2025-10-20 20:46:43 +11:00
Zalathar d828c11f96 Move AuxProps out of EarlyProps
The primary purpose of `EarlyProps` is to discover revisions, so that we can
create a separate test structure for each revision.

Revisions can (and do) have different auxiliaries, and up-to-date checking is
already done per-revision, so it makes more sense to perform up-to-date checks
based on the current revisions's auxiliaries only.
2025-10-20 15:44:14 +11:00
Zalathar 84861fa765 Skip up-to-date checking for tests that are already ignored 2025-10-20 14:12:23 +11:00
Stuart Cook 905b9da611 Rollup merge of #147879 - Zalathar:directive, r=jieyouxu
compiletest: Include a file path in `DirectiveLine`

This avoids the need to laboriously pass a test/aux file path into dozens of directive parsing methods that already take a `DirectiveLine`.

r? jieyouxu
2025-10-20 09:08:34 +11:00
Manuel Drehwald 3e32dc27e3 update CONFIG_CHANGE_HISTORY 2025-10-19 21:04:40 +02:00
Manuel Drehwald 788717b60f update autodiff docs in the dev guide 2025-10-19 21:04:36 +02:00
bors 4ddbb60512 Auto merge of #147884 - matthiaskrgr:rollup-pjqcccz, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - rust-lang/rust#147575 (Refactor move analysis subpath representation)
 - rust-lang/rust#147864 (Parse `const unsafe trait` properly)
 - rust-lang/rust#147868 (MirPatch: Simplify new_local.)
 - rust-lang/rust#147873 (comments for deduce_param_attrs)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-19 17:18:27 +00:00
Manuel Drehwald 0f93363124 enzyme/autodiff is compatible with download-ci=true 2025-10-19 19:18:18 +02:00
Matthias Krüger 3bfd71290e Rollup merge of #147575 - beepster4096:movesubpath, r=oli-obk
Refactor move analysis subpath representation

Follow up to rust-lang/rust#147055

This PR does two things:
1. Document/validate move analysis's assumptions about `Subslice` projections
2. Decouple move paths from `ProjectionElem`, using a new enum `MoveSubPath` instead
    - This would be needed eventually when `ProjectionElem::Deref` is removed

I wanted to do even more abstraction, making `MovePathLookup::find` return an iterator to remove the special handling of subslices in borrowck, but that regressed diagnostics and just wasn't worth the complexity.
2025-10-19 14:04:53 +02:00
bors c6efb9019b Auto merge of #147698 - Kobzol:lld-target, r=jieyouxu
Do not enable LLD if we don't build host code for targets that opt into it

Should fix the problem mentioned in https://github.com/rust-lang/rust/pull/147626#issuecomment-3402635247.

r? `@jieyouxu`
2025-10-19 11:55:04 +00:00
Zalathar 37a0e62cd2 Include a file path in DirectiveLine
This avoids the need to laboriously pass a test/aux file path into dozens of
directive parsing methods that already take a `DirectiveLine`.
2025-10-19 21:50:46 +11:00
Matthias Krüger fa1a0c3bb4 Rollup merge of #147816 - Kobzol:bootstrap-download-rustc-lto, r=jieyouxu
Do not error out for `download-rustc` if LTO is configured

Noted [here](https://github.com/rust-lang/rust/issues/141953#issuecomment-3404838305). LTO should indeed be mostly a perf-only change.

r? ``@jieyouxu``
2025-10-18 23:54:46 +02:00
Jonathan Brouwer e3dd4c1987 Warn on unused_attributes in tests
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-10-18 21:13:52 +02:00
bjorn3 dd70015f46 Deny all licenses that are not like MIT for the runtime libraries 2025-10-18 15:53:20 +00:00
bjorn3 2ed1f47f7c Fix typo
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
2025-10-18 17:46:18 +02:00
Matthias Krüger 27b00187b2 Rollup merge of #147809 - GuillaumeGomez:fix-rustdoc-passes, r=fmease
rustdoc: Fix passes order so intra-doc links are collected after stripping passes

Fixes regression I introduced in https://github.com/rust-lang/rust/pull/147153.

This PR puts back the intra-doc link collecting pass after the stripping items pass, preventing lints to be emitted on non-visible items.

Although, might be nice to add a way to change this behaviour. To be discussed later on.

cc ``@ojeda``
r? ``@fmease``
2025-10-18 15:09:05 +02:00
Matthias Krüger 063b26adda Rollup merge of #147783 - durin42:object-unification, r=Zalathar
bootstrap: migrate to object 0.37

I noticed we had a mix of 0.37 and 0.36 at work, and this was why. As far as I can tell everything still builds and works correctly.
2025-10-18 15:09:04 +02:00
Matthias Krüger 2b582ea0ba Rollup merge of #147532 - JonathanBrouwer:cfg_attr2, r=jdonszelmann
Port `#[cfg_attr]` to the new attribute parsing infrastructure

This work in progress, not ready for review.
PR mostly for ci/perf runs
2025-10-18 15:09:03 +02:00
bjorn3 6ab00baad0 Minor change 2025-10-18 13:08:28 +00:00
bjorn3 e7b96944df Add a separate licenses list for licenses that are fine in tools only
With this the only remaining license exceptions are for licenses that
are to copyleft to varying degrees.
2025-10-18 13:08:09 +00:00
bjorn3 8510865d64 Add a couple of licenses that are can be used as MIT, Apache-2.0 or as both 2025-10-18 13:02:53 +00:00
bjorn3 3621785401 Add Apache-2.0 WITH LLVM-exception to list of allowed licenses
It is more permissive than Apache-2.0 which is already allowed.
2025-10-18 12:51:46 +00:00
bjorn3 66c81a0024 tidy: Add check that license exceptions are actually used 2025-10-18 12:49:20 +00:00
Matthias Krüger 706f5fbf7f Rollup merge of #147824 - moturus:motor-os-docs, r=Urgau
docs: update Motor OS target docs

Update the docs to reflect that [Motor OS std library PR](https://github.com/rust-lang/rust/pull/147000) has been merged.
2025-10-18 08:08:40 +02:00
bors 2170b4da84 Auto merge of #144607 - camsteffen:impl-trait-header-option, r=lcnr
Limit impl_trait_header query to only trait impls

Changes `impl_trait_header` to panic on inherent impls intstead of returning None. A few downstream functions are split into option and non-option returning functions. This gets rid of a lot of unwraps where we know we have a trait impl, while there are still some cases where the Option is helpful.

Summary of changes to tcx methods:
* `impl_is_of_trait` (new)
* `impl_trait_header` -> `impl_trait_header`/`impl_opt_trait_header`
* `impl_trait_ref` -> `impl_trait_ref`/`impl_opt_trait_ref`
* `trait_id_of_impl` -> `impl_trait_id`/`impl_opt_trait_id`
2025-10-18 00:08:18 +00:00
U. Lasiotus 2e33760daf docs: update Motor OS target docs
Update the docs to reflect that
[Motor OS std library PR](https://github.com/rust-lang/rust/pull/147000)
has been merged.
2025-10-17 13:16:14 -07:00
Jakub Beránek ce320bb35a Do not error out for download-rustc if LTO is configured 2025-10-17 18:15:09 +02:00
bors f46475914d Auto merge of #147660 - notriddle:stringdex-002, r=GuillaumeGomez
rustdoc-search: stringdex 0.0.2

Two index format tweaks that reduce the size of the standard library, compiler, and wordnet dictionary when I test it.

CC rust-lang/rust#146048

FF Profiler output: https://share.firefox.dev/4onH5xP

Preview: https://notriddle.com/rustdoc-html-demo-12/stringdex-002/std/index.html
2025-10-17 15:42:33 +00:00
Cameron Steffen d9a53899db Fix clippy for impl_trait_header changes 2025-10-17 08:36:34 -05:00
Cameron Steffen b323f567d9 Remove Option from impl_trait_header 2025-10-17 08:36:34 -05:00
Cameron Steffen e60e9f0826 Split impl_(opt_)trait_ref 2025-10-17 08:36:34 -05:00
Guillaume Gomez fcc47d07a3 rustdoc: Fix passes order so intra-doc links are collected after stripping passes 2025-10-17 14:44:59 +02:00
bors a41214f9bd Auto merge of #147779 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`

`Cargo.lock` update, because `clippy_utils` is now also using `itertools`
2025-10-17 07:57:20 +00:00
Philipp Krones 50561837de Merge commit 'd9fb15c4b1ebe9e7dc419e07f53af681d7860cbe' into clippy-subtree-update 2025-10-16 20:38:28 +02:00
Augie Fackler 10a533417b bootstrap: migrate to object 0.37
I noticed we had a mix of 0.37 and 0.36 at work, and this was why. As
far as I can tell everything still works fine.
2025-10-16 14:07:50 -04:00
Matthias Krüger 3a993f7458 Rollup merge of #147752 - fee1-dead-contrib:sgtypo, r=chenyukang
style-guide: fix typo for empty struct advice

the advice appears to apply to empty structs with braces (parens/blocks), and a unit struct in the comment does not make sense. Fix the typo.
2025-10-16 19:35:28 +02:00
Matthias Krüger 6f66f3baf5 Rollup merge of #147744 - RalfJung:miri, r=RalfJung
miri subtree update

Subtree update of `miri` to https://github.com/rust-lang/miri/commit/50ba3a7de8a6b0e288d86f176094fe1fd62f653b.

Created using https://github.com/rust-lang/josh-sync.

r? ``````@ghost``````
2025-10-16 19:35:26 +02:00
Matthias Krüger 91f48d8ba7 Rollup merge of #147000 - moturus:motor-os_stdlib_pr, r=tgross35
std: Add Motor OS std library port

Motor OS was added as a no-std Tier-3 target in
[PR 146848](https://github.com/rust-lang/rust/pull/146848) as x86_64-unknown-motor.

This PR adds the std library for Motor OS.

While the PR may seem large, all it does is proxy
std pal calls to [moto-rt](https://crates.io/crates/moto-rt). Where there is some non-trivial
code (e.g. thread::spawn), it is quite similar, often
identical, to what other platforms do.
2025-10-16 19:35:23 +02:00
bors f5242367f4 Auto merge of #146221 - camsteffen:ast-boxes, r=cjgillot
Remove boxes from ast list elements

Less indirection should be better perf.
2025-10-16 02:31:44 +00:00
Deadbeef 74ac3ec91a style-guide: fix typo for empty struct advice
the advice appears to apply to empty structs with braces (parens/blocks), and
a unit struct in the comment does not make sense. Fix the typo.
2025-10-16 01:03:56 +00:00
Matthias Krüger a4d2811b88 Rollup merge of #147742 - Diggsey:db-fix-miri-whitespace, r=RalfJung
Revert unintentional whitespace changes to rustfmt-excluded file

Accidentally introduced in https://github.com/rust-lang/rust/pull/143548
2025-10-15 23:41:07 +02:00
Matthias Krüger 212826db7d Rollup merge of #147718 - RalfJung:miri-allocator_shim_contents, r=bjorn3
miri: use allocator_shim_contents codegen helper

r? `@bjorn3`

Follow-up to https://github.com/rust-lang/rust/pull/147526, also using that new infrastructure in Miri.
2025-10-15 23:41:05 +02:00
Matthias Krüger c607de5508 Rollup merge of #147676 - jdonszelmann:span-is-doc-comment, r=GuillaumeGomez
Return spans out of `is_doc_comment` to reduce reliance on `.span()` on attributes

r? `@GuillaumeGomez`
2025-10-15 23:41:03 +02:00
Diggory Blake 87e0f43c56 Revert unintentional whitespace changes to rustfmt-excluded file 2025-10-15 21:34:38 +01:00
Jonathan Brouwer 52cc311828 Rename some functions
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-10-15 22:18:17 +02:00