Commit Graph

265713 Commits

Author SHA1 Message Date
Matthias Krüger
72b0f5b8d2
Rollup merge of #130154 - okaneco:stabilize_char_min, r=cuviper
Stabilize `char::MIN`

FCP completed https://github.com/rust-lang/rust/issues/114298#issuecomment-2335250508
Closes #114298
2024-09-09 20:20:21 +02:00
Matthias Krüger
7c109b152b
Rollup merge of #130153 - onur-ozkan:verbose-to-verbose-tests, r=Kobzol
use verbose flag as a default value for `rust.verbose-tests`

See the [Zulip thread](https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Run.20tests.20in.20x.2Epy.20with.20.22pretty.22.20test.20rendering.3F) for more context.
2024-09-09 20:20:20 +02:00
Matthias Krüger
3b0221bf63
Rollup merge of #130137 - gurry:master, r=cjgillot
Fix ICE caused by missing span in a region error

Fixes #130012

The ICE occurs on line 634 in this error handling code: 085744b7ad/compiler/rustc_trait_selection/src/error_reporting/infer/region.rs (L617-L637) It is caused by the span being a dummy span and `!span.is_dummy()` on line 628 evaluating to `false`.

A dummy span, however, is expected here thanks to the `Self: Trait` predicate from `predicates_of` (see line 61): 085744b7ad/compiler/rustc_hir_analysis/src/collect/predicates_of.rs (L61-L69)

This PR changes the error handling code to omit the note which needed the span instead of ICE'ing in the presence of a dummy span.
2024-09-09 20:20:20 +02:00
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
Ralf Jung
e10224a7c3 move const fn with a null check into const_ptr_is_null gate 2024-09-09 20:09:13 +02:00
onur-ozkan
12998c2e11 handle GitConfig for tools/suggest-tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-09 21:03:51 +03:00
Ralf Jung
720bd0dd6c move some const fn out of the const_ptr_as_ref feature 2024-09-09 19:59:16 +02:00
onur-ozkan
667cf22f48 bump download-ci-llvm-stamp
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-09 20:31:58 +03:00
onur-ozkan
9aa823cc67 replace get_closest_merge_base_commit with get_closest_merge_commit
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-09 20:19:29 +03:00
onur-ozkan
dc9c5f251c implement build_helper::git::get_closest_merge_commit
Compare to `get_git_merge_base`, this doesn't require configuring the upstream remote.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-09 20:18:06 +03:00
onur-ozkan
05043a370a add git_merge_commit_email into GitConfig
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-09 20:17:34 +03:00
James C. Wise
99cad123ed
Fix slice::first_mut docs
pointer -> reference
2024-09-09 13:13:45 -04:00
rustbot
8b052eaad1 Update books 2024-09-09 13:00:45 -04:00
bors
d7522d8726 Auto merge of #128939 - bjorn3:windows_cg_clif_component, r=albertlarsan68
Distribute rustc_codegen_cranelift for Windows

With support for raw-dylib recently added to cg_clif, and inline assembly support working on Windows for quite a while now, all blockers for distributing cg_clif on Windows that I mentioned in https://github.com/rust-lang/rust/pull/81746#issuecomment-1774099637 are fixed now.
2024-09-09 16:09:06 +00:00
onur-ozkan
13ea104798 update rust.verbose-tests doc in config.example.toml
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-09 18:56:37 +03:00
okaneco
bc70fa2f22 Stabilize char::MIN 2024-09-09 11:48:12 -04:00
onur-ozkan
19b8f9e17c use verbose flag as a default value for rust.verbose-tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-09-09 18:47:38 +03:00
Ralf Jung
0a70924c21 fix UB in a test
also add an explicit test for the fact that a Option<WidePtr> has padding when it is None
2024-09-09 16:17:34 +02:00
Krasimir Georgiev
383f506227 adapt a test for llvm 20
No functional changes intended.
2024-09-09 13:29:47 +00:00
Urgau
0f9cb070bc Add test about missing docs at crate level 2024-09-09 14:51:39 +02:00
Urgau
a1a8627dd7 Allow missing_docs lint on the generated test harness 2024-09-09 14:51:39 +02:00
Ralf Jung
65c70900ce union padding computation: add fast-path for ZST
Also avoid even tracking empty ranges, and add fast-path for arrays of scalars
2024-09-09 14:46:26 +02:00
Mads Marquart
dd35398545 Pass deployment target when linking with cc on Apple targets
When linking macOS targets with cc, pass the `-mmacosx-version-min=.`
option to specify the desired deployment target. Also, no longer pass
`-m32`/`-m64`, these are redundant since we already pass `-arch`.

When linking with cc on other Apple targets, always pass `-target`.
(We assume for these targets that cc => clang).
2024-09-09 13:57:17 +02:00
Mads Marquart
97df8fb7ec Fix default/minimum deployment target for Aarch64 simulator targets
The minimum that `rustc` encoded did not match the version in Clang, and
that meant that that when linking, we ended up bumping the version.

Specifically, this sets the correct deployment target of the following
simulator and Mac Catalyst targets:
- `aarch64-apple-ios-sim` from 10.0 to 14.0
- `aarch64-apple-tvos-sim` from 10.0 to 14.0
- `aarch64-apple-watchos-sim` from 5.0 to 7.0
- `aarch64-apple-ios-macabi` from 13.1 to 14.0

I have chosen to not document the simulator target versions in the
platform support docs, as it is fundamentally uninteresting; the normal
targets (e.g. `aarch64-apple-ios`, `aarch64-apple-tvos`) still have the
same deployment target as before, and that's what developers should
actually target.
2024-09-09 13:55:14 +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
Urgau
843708a32e Add missing #[allow(missing_docs)] on hack functions in alloc 2024-09-09 13:44:09 +02:00
Pavel Grigorenko
db6361184e Helper function for formatting with LifetimeSuggestionPosition 2024-09-09 14:39:04 +03:00
Eduardo Sánchez Muñoz
0b20ffcb63 Remove needless returns detected by clippy in the compiler 2024-09-09 13:32:22 +02:00
Folkert de Vries
02378997ea bootstrap naked_asm! for compiler-builtins
in this commit, `naked_asm!` is an alias for `asm!` with one difference: `options(noreturn)` is always enabled by `naked_asm!`. That makes it future-compatible for when `naked_asm!` starts disallowing `options(noreturn)` later.
2024-09-09 12:47:40 +02:00
Ralf Jung
62d196feb1 bootstrap/Makefile.in: miri: add missing BOOTSTRAP ARGS
also don't unnecessarily set BOOTSTRAP_SKIP_TARGET_SANITY while we are at it
2024-09-09 12:12:14 +02: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