Commit Graph

265371 Commits

Author SHA1 Message Date
Matthias Krüger
3658bfb6ea
Rollup merge of #130131 - Zalathar:up-to-date, r=Kobzol
Print a helpful message if any tests were skipped for being up-to-date

When running tests without the `--force-rerun` flag, compiletest will automatically skip any tests that (in its judgement) don't need to be run again since the last time they were run.

This is normally very useful, but can occasionally be confusing, especially in edge-cases where up-to-date checking is not completely accurate (or the test is flaky).

This PR makes bootstrap count the number of tests that were ignored for being up-to-date (via a hard-coded check on the ignore reason), and prints a helpful message when that number is nonzero.

---

Sample output:

```text
test result: ok. 4 passed; 0 failed; 17578 ignored; 0 measured; 0 filtered out; finished in 463.79ms

help: ignored 17295 up-to-date tests; use `--force-rerun` to prevent this

Build completed successfully in 0:00:07
```
2024-09-09 20:20:19 +02:00
Matthias Krüger
2d26ebe3f9
Rollup merge of #130067 - madsmtm:clean-up-fs-test, r=ChrisDenton
Remove redundant check in `symlink_hard_link` test

We support macOS 10.12 and above, so it now always uses `linkat`, and so the check is redundant.

This was missed in #126351.

``@rustbot`` label O-macos
2024-09-09 20:20:19 +02:00
Matthias Krüger
1490fe6d16
Rollup merge of #130064 - folkertdev:fix-issue-129983, r=compiler-errors
fix ICE in CMSE type validation

fixes #129983

tracking issue: https://github.com/rust-lang/rust/issues/81391

r? ``@compiler-errors``
2024-09-09 20:20:18 +02:00
Matthias Krüger
ee8fd33f60
Rollup merge of #130022 - nnethercote:dataflow-borrowck-lifetimes, r=oli-obk
Dataflow/borrowck lifetime cleanups

These commits remove a bunch of unnecessary lifetimes from structs involved in dataflow/borrowck.

r? ``@lqd``
2024-09-09 20:20:17 +02:00
Matthias Krüger
3e3b14845d
Rollup merge of #129929 - nnethercote:rustc_mir_transform-cleanups-2, r=cjgillot
`rustc_mir_transform` cleanups, round 2

More cleanups in the style of #129738.

r? ``@cjgillot``
2024-09-09 20:20:17 +02:00
bors
38e3a5771c Auto merge of #130135 - Kobzol:bootstrap-check-linker, r=onur-ozkan
Do not skip linker configuration for `check` builds

This essentially reverts a part of https://github.com/rust-lang/rust/pull/128871, to fix https://github.com/rust-lang/rust/issues/130108. This is mostly a hotfix until we can figure out a better way to both avoid rebuilds and avoid configuring the linker for `x check`.

Skipping linker for check builds was causing unexpected rebuilds.

Fixes: https://github.com/rust-lang/rust/issues/130108
2024-09-09 11:49:07 +00:00
bors
1f44f0a66f Auto merge of #130133 - workingjubilee:rollup-t5o827k, r=workingjubilee
Rollup of 14 pull requests

Successful merges:

 - #119229 (Update mingw-w64 + GNU toolchain)
 - #128345 (added support for GNU/Hurd on x86_64)
 - #128667 (rustdoc: normalise type/field names)
 - #129876 (Use sysroot crates maximally in `rustc_codegen_gcc`.)
 - #130034 ( Fix enabling wasm-component-ld to match other tools )
 - #130048 (run-make-support: Add llvm-pdbutil)
 - #130068 (Test codegen when setting deployment target)
 - #130070 (Rename variant `AddrOfRegion` of `RegionVariableOrigin` to `BorrowRegion`)
 - #130087 (remove 'const' from 'Option::iter')
 - #130090 (make Result::copied unstably const)
 - #130092 (Fixes typo in wasm32-wasip2 doc comment)
 - #130107 (const: make ptr.is_null() stop execution on ambiguity)
 - #130115 (Remove needless returns detected by clippy in libraries)
 - #130130 (Miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-09-09 09:24:11 +00:00
Folkert de Vries
e186cc6df8 do PolyFnSig -> FnSig conversion later 2024-09-09 11:09:22 +02:00
Jakub Beránek
c33aa863f8
Do not skip linker configuration for check builds
It was causing unexpected rebuilds.
2024-09-09 10:07:22 +02:00
Jubilee
3e01a5da6e
Rollup merge of #130130 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2024-09-09 00:17:52 -07:00
Jubilee
2f1cf6feb0
Rollup merge of #130115 - eduardosm:needless-returns-libs, r=workingjubilee
Remove needless returns detected by clippy in libraries
2024-09-09 00:17:52 -07:00
Jubilee
fad44c424f
Rollup merge of #130107 - RalfJung:const-ptr-is-null, r=oli-obk
const: make ptr.is_null() stop execution on ambiguity

This seems better than saying `false` -- saying `false` is in fact actively unsound if `NonNull` then uses this to permit putting this pointer inside of it, but at runtime it turns out to be null.

Part of https://github.com/rust-lang/rust/issues/74939
Cc ```@rust-lang/wg-const-eval```
2024-09-09 00:17:51 -07:00
Jubilee
a7c5797c90
Rollup merge of #130092 - zslayton:master, r=jieyouxu
Fixes typo in wasm32-wasip2 doc comment
2024-09-09 00:17:51 -07:00
Jubilee
4a26f3b0ba
Rollup merge of #130090 - RalfJung:result-copied, r=Noratrieb
make Result::copied unstably const

The corresponding `Option::copied` is unstably const, so seems reasonable to do the same here.
2024-09-09 00:17:50 -07:00
Jubilee
38520aed18
Rollup merge of #130087 - RalfJung:option-const-iter, r=workingjubilee
remove 'const' from 'Option::iter'

This is kind of pointless to be a `const fn` since you can't do anything with the iterator. It is also the only `const fn iter*` in the entire standard library. It probably got constified when `~const` traits got added everywhere, and then was forgotten to be de-constified when that was undone.

The rest of the const_option feature seems like it can reasonably be stabilized, but this one IMO should not be stabilized, and it's not worth creating a new tracking issue.

Cc https://github.com/rust-lang/rust/issues/67441
2024-09-09 00:17:50 -07:00
Jubilee
09373b997d
Rollup merge of #130070 - gurry:rename-regionkind-addof-to-ref, r=compiler-errors
Rename variant `AddrOfRegion` of `RegionVariableOrigin` to `BorrowRegion`

because "Borrow" is the more idiomatic Rust term than "AddrOf".
2024-09-09 00:17:49 -07:00
Jubilee
fd938c7441
Rollup merge of #130068 - madsmtm:deployment-target-test, r=jieyouxu
Test codegen when setting deployment target

Test our codegen in different scenarios when setting the deployment target. There are many places here where this is still incorrect, these will be fixed in https://github.com/rust-lang/rust/pull/129342, https://github.com/rust-lang/rust/pull/129367 and https://github.com/rust-lang/rust/pull/129369. See https://github.com/rust-lang/rust/issues/129432 for the bigger picture.

Tested locally using:
```console
./x test tests/run-make/apple-deployment-target --target="aarch64-apple-darwin,aarch64-apple-ios,aarch64-apple-ios-macabi,aarch64-apple-ios-sim,aarch64-apple-tvos,aarch64-apple-tvos-sim,aarch64-apple-visionos,aarch64-apple-visionos-sim,aarch64-apple-watchos,aarch64-apple-watchos-sim,arm64_32-apple-watchos,armv7s-apple-ios,i386-apple-ios,x86_64-apple-darwin,x86_64-apple-ios,x86_64-apple-ios-macabi,x86_64-apple-tvos,x86_64-apple-watchos-sim,x86_64h-apple-darwin"
```

The only Apple targets that aren't tested by the above command are:
- `arm64e-apple-darwin`, failed to build, see https://github.com/rust-lang/cc-rs/issues/1205.
- `armv7k-apple-watchos`, failed to link, see https://github.com/rust-lang/rust/issues/130071.
- `arm64e-apple-ios`, failed to link, see https://github.com/rust-lang/rust/issues/130085.
- `i686-apple-darwin`, requires a bit of setup and an older machine, see [the docs](https://doc.rust-lang.org/nightly/rustc/platform-support/i686-apple-darwin.html).
- `i386-apple-ios` requires you to set `IPHONEOS_DEPLOYMENT_TARGET=10.0` for the test helpers to work, will be fixed by https://github.com/rust-lang/cc-rs/issues/1030.

But all of this is as it was before this PR.

Fixes https://github.com/rust-lang/rust/issues/47825, since we now have a test that compiles a `dylib` for `aarch64-apple-ios`.

Split out from https://github.com/rust-lang/rust/pull/129342, see that for a little bit of the review that this has gone through already.

r? petrochenkov

```@rustbot``` label O-apple
2024-09-09 00:17:49 -07:00
Jubilee
97d62ac2e1
Rollup merge of #130048 - nebulark:runmake_llvm_pdbutil, r=jieyouxu
run-make-support: Add llvm-pdbutil

Add llvm-pdbutil to run-make-support, so we can write better unit tests for PDB specific features.

r? ````@jieyouxu````
````@rustbot```` label: +O-windows
2024-09-09 00:17:48 -07:00
Jubilee
c21d31a61a
Rollup merge of #130034 - alexcrichton:fix-some-wasm-component-ld-comments, r=onur-ozkan
Fix enabling wasm-component-ld to match other tools

It was [pointed out recently][comment] that enabling `wasm-component-ld` as a host tool is different from other host tools. This commit refactors the logic to match by deduplicating selection of when to build other tools and then using the same logic for `wasm-component-ld`.

While here I also fixed a typo pointed out in https://github.com/rust-lang/rust/pull/126967#pullrequestreview-2285267534

[comment]: https://github.com/rust-lang/rust/pull/127866#issuecomment-2333434720
2024-09-09 00:17:48 -07:00
Jubilee
15c7d2715a
Rollup merge of #129876 - nnethercote:more-sysroot-rustc_codegen_gcc, r=Mark-Simulacrum
Use sysroot crates maximally in `rustc_codegen_gcc`.

This shrinks `compiler/rustc_codegen_gcc/Cargo.lock` quite a bit. The only remaining dependencies in `compiler/rustc_codegen_gcc/Cargo.lock` are `gccjit`, `lang_tester`, and `boml`, all of which aren't used in any other compiler crates.

The commit also reorders and adds comments to the `extern crate` items so they match those in miri.

r? ```@Mark-Simulacrum```
2024-09-09 00:17:47 -07:00
Jubilee
4cfb1c3154
Rollup merge of #128667 - its-the-shrimp:rustdoc_json_types_rename, r=aDotInTheVoid
rustdoc: normalise type/field names

Updates #100961

- `Import` -> `Use`, to better reflect the terminology of Rust & its syntax
- `TypeBinding` -> `AssocItemConstraint`, to sync up with `clean`
- `FnDecl` -> `FunctionSignature`, because that's what it is
- `Header` -> `FunctionHeader`, because `Header` is a very word that's very heavily loaded with different meanings
- `ItemEnum::AssocType`: `default` -> `type`, because those items appear in `impl` blocks as well, where they're _not_ the "default"
- `ItemEnum::AssocConst`: `default` -> `value`, see the previous point
- `ForeignType` -> `ExternType`, because "foreign" is not the right word there
- boolean fields' names made to consistently be a phrase that can be a yes/no answer, e.g. `async` -> `is_async`

The docs of `ItemEnum::AssocType::type_` & of `ItemEnum::AssocConst::value` are also updated to be up to date with the clarification of the name of the fields
2024-09-09 00:17:47 -07:00
Jubilee
2cce01ee62
Rollup merge of #128345 - sthibaul:hurd-amd64, r=Urgau
added support for GNU/Hurd on x86_64
2024-09-09 00:17:46 -07:00
Jubilee
1ea466bdce
Rollup merge of #119229 - mati865:update-mingw-toolchain, r=jieyouxu,petrochenkov
Update mingw-w64 + GNU toolchain

The list of packaged tools and their versions is available at: https://github.com/niXman/mingw-builds-binaries/releases/tag/14.1.0-rt_v12-rev0

Fixes: https://github.com/rust-lang/rust/issues/112368
2024-09-09 00:17:46 -07:00
bors
263a3aeeb8 Auto merge of #129788 - onur-ozkan:incompatibility-check-for-llvm, r=Kobzol
detect incompatible CI LLVM options more precisely

Previously, the logic here was simply checking whether the option was set in `config.toml`. This approach was not manageable in our CI runners as we set so many options in config.toml. In reality, those values are not incompatible since they are usually the same value used to generate the CI llvm. Now, the new logic compares the configuration values with the values used to generate the CI llvm, so we get more precise results and make the process more manageable.

Fixes #129153
2024-09-09 06:59:43 +00:00
Nicholas Nethercote
5c3502772a Remove unnecessary lifetime from StorageConflictVisitor. 2024-09-09 16:44:01 +10:00
Nicholas Nethercote
0b032f8f83 Remove Elaborator.
It's a trivial wrapper around `ElaborateDropsCtxt` that serves no
apparent purpose.
2024-09-09 16:33:29 +10:00
Nicholas Nethercote
dc62f07458 Remove Gatherer.
It's a very thin wrapper that pairs `MoveDataBuilder` with a `Location`,
and it has four lifetime arguments. This commit removes it by just
adding a `Location` to `MoveDataBuilder`.
2024-09-09 16:33:27 +10:00
Nicholas Nethercote
28a6dc4d1e Rename some lifetimes.
Give them the names used in most places.
2024-09-09 16:25:44 +10:00
Nicholas Nethercote
1aafeb2d5a Remove unnecessary lifetime from OperandCollector.
Also put the remaining lifetimes into the usual order.
2024-09-09 16:24:08 +10:00
Nicholas Nethercote
bed91f5065 Remove unnecessary lifetime in PlaceCollector. 2024-09-09 16:24:06 +10:00
Nicholas Nethercote
3fe7dd6893 Remove unnecessary lifetimes in dataflow structs.
There are four related dataflow structs: `MaybeInitializedPlaces`,
`MaybeUninitializedPlaces`, and `EverInitializedPlaces`,
`DefinitelyInitializedPlaces`. They all have a `&Body` and a
`&MoveData<'tcx>` field. The first three use different lifetimes for the
two fields, but the last one uses the same lifetime for both.

This commit changes the first three to use the same lifetime, removing
the need for one of the lifetimes. Other structs that also lose a
lifetime as a result of this are `LivenessContext`, `LivenessResults`,
`InitializationData`.

It then does similar things in various other structs.
2024-09-09 16:14:18 +10:00
Zalathar
acccb39bff Print a helpful message if any tests were skipped for being up-to-date 2024-09-09 16:00:14 +10:00
Nicholas Nethercote
5445953659 Improve consistency in LowerIntrinsics.
In some cases `target` and `arg` are obtained fallibly, and in some
cases they are obtained infallibly. This commit changes them all to
infallible.
2024-09-09 15:15:44 +10:00
Nicholas Nethercote
751c8b481b Use LocalDecls in a couple of places.
It's nicer than the `IndexVec` type.
2024-09-09 15:15:44 +10:00
Nicholas Nethercote
7adde3f074 Make CallSite non-Copy.
It doesn't need to be, and it's 72 bytes on 64-bit platforms, which is
fairly large.
2024-09-09 15:15:43 +10:00
Nicholas Nethercote
9cf90b9fc9 Remove some unnecessary dereferences. 2024-09-09 15:15:43 +10:00
Nicholas Nethercote
4f2588f23a Remove an unnecessary continue.
Nothing comes after it within the loop.
2024-09-09 15:15:43 +10:00
Nicholas Nethercote
181fbd5ce8 Use let/else to de-indent ElaborateBoxDerefs::run_pass. 2024-09-09 15:15:43 +10:00
Nicholas Nethercote
cc09ab3c75 Simplify verify_candidate_branch.
Let chains are perfect for this kind of function.
2024-09-09 15:15:43 +10:00
Nicholas Nethercote
ec6fe4e198 Streamline AbortUnwindingCalls.
Currently it constructs two vectors `calls_to_terminated` and
`cleanups_to_remove` in the main loop, and then processes them after the
main loop. But the processing can be done in the main loop, avoiding the
need for the vectors.
2024-09-09 15:15:42 +10:00
Zalathar
a6735e44ca Add an explicit ignore message for "up-to-date" tests
When running tests without the `--force-rerun` flag, compiletest will
automatically skip any tests that (in its judgement) don't need to be run again
since the last time they were run.

This patch adds an explicit reason to those skipped tests, which is visible
when running with `rust.verbose-tests = true` in `config.toml`.
2024-09-09 14:11:43 +10:00
bors
085744b7ad Auto merge of #130036 - weiznich:diagnostic_unstable_tracking, r=compiler-errors
Correctly handle stability of `#[diagnostic]` attributes

This commit changes the way we treat the stability of attributes in the
`#[diagnostic]` namespace. Instead of relaying on ad-hoc checks to
ensure at call side that a certain attribute is really usable at that
location it centralises the logic to one place. For diagnostic
attributes comming from other crates it just skips serializing
attributes that are not stable and that do not have the corresponding
feature enabled. For attributes from the current crate we can just use
the feature information provided by `TyCtx`.

r​? `@compiler-errors`
2024-09-08 23:39:00 +00:00
Nicholas Nethercote
cd9fd274d1 Factor out some more repetitive code. 2024-09-09 08:48:09 +10:00
Nicholas Nethercote
6af470e360 Reduce visibilities, and add warn(unreachable_pub).
Lots of unnecessary `pub`s in this crate. Most are downgraded to
`pub(super)`, though some don't need any visibility.
2024-09-09 08:48:09 +10:00
Samuel Thibault
7626015848 added support for GNU/Hurd on x86_64 2024-09-08 23:37:07 +02:00
Eduardo Sánchez Muñoz
5f3fdd14df Remove needless returns detected by clippy in libraries 2024-09-08 21:51:00 +02:00
Ralf Jung
11d51aae86 const: make ptr.is_null() stop execution on ambiguity 2024-09-08 19:07:46 +02:00
Ralf Jung
f7b4f4a73b Option, Result: put the &mut variants of 'copied' under the same feature as the '&' variants 2024-09-08 16:52:40 +02:00
onur-ozkan
7b8cbe4f1c handle dry-run mode in Config::get_builder_toml
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-08 17:52:21 +03:00
onur-ozkan
13e16a9101 use Config::get_builder_toml for ci-rustc config parsing
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-08 17:52:18 +03:00