Commit graph

258553 commits

Author SHA1 Message Date
Nicholas Nethercote aa30dd444b Fix a typo in a comment. 2024-06-24 09:44:19 +10:00
bors bcf94dec5b Auto merge of #126878 - matthiaskrgr:rollup-oufemqp, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #126230 (tidy: skip submodules if not present for non-CI environments)
 - #126612 (Update outdated README in build-manifest.)
 - #126616 (less bootstrap warnings)
 - #126663 (remove `GIT_DIR` handling in pre-push hook)
 - #126830 (make unsized_fn_params an internal feature)
 - #126833 (don't ICE when encountering an extern type field during validation)
 - #126837 (delegation: Do not crash on qpaths without a trait)
 - #126851 (Rework pattern and expression nonterminal kinds.)
 - #126862 (Add needs-symlink directive to compiletest)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-23 21:23:55 +00:00
Matthias Krüger e4f102d174
Rollup merge of #126862 - ChrisDenton:needs-symlink, r=jieyouxu
Add needs-symlink directive to compiletest

This is an alternative to #126846 that allows running symlink tests on Windows in CI but will ignore them locally if symlinks aren't available. A future improvement would be to check that the `needs-symlink` directive is used in rmake files that call `create_symlink` but this is just a quick PR to unblock Windows users who want to run tests locally without enabling symlinks.
2024-06-23 22:39:02 +02:00
Matthias Krüger 0149bc47d8
Rollup merge of #126851 - nnethercote:NtExprKind-NtPatKind, r=compiler-errors
Rework pattern and expression nonterminal kinds.

Some tweaks to `NonterminalKind` that will assist with #124141. Details in the individual commits.

r? compiler-errors
cc ```@eholk```
2024-06-23 22:39:01 +02:00
Matthias Krüger 2c0311dbbe
Rollup merge of #126837 - petrochenkov:delegfix, r=compiler-errors
delegation: Do not crash on qpaths without a trait

Fixes https://github.com/rust-lang/rust/issues/126742
2024-06-23 22:39:01 +02:00
Matthias Krüger a9959bd1ab
Rollup merge of #126833 - RalfJung:extern-type-field-ice, r=compiler-errors
don't ICE when encountering an extern type field during validation

"extern type" is a pain that keeps on giving...

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

r? ```@oli-obk```
2024-06-23 22:39:00 +02:00
Matthias Krüger 0a7adafe4f
Rollup merge of #126830 - RalfJung:unsized-fn-params, r=compiler-errors
make unsized_fn_params an internal feature

As suggested [here](https://github.com/rust-lang/rust/pull/123894#issuecomment-2054043053).
r? `@compiler-errors`

Fixes https://github.com/rust-lang/rust/issues/123887 (kind of -- ICEs on internal features are considered acceptable so this issue is not-a-bug once this PR lands)
2024-06-23 22:39:00 +02:00
Matthias Krüger 6736641146
Rollup merge of #126663 - onur-ozkan:gitdir-thing, r=Mark-Simulacrum
remove `GIT_DIR` handling in pre-push hook

This is already handled from bootstrap: a1ca449981/src/bootstrap/src/utils/helpers.rs (L504-L506)
2024-06-23 22:38:59 +02:00
Matthias Krüger 4a3863e7e3
Rollup merge of #126616 - onur-ozkan:less-warnings, r=Mark-Simulacrum
less bootstrap warnings

This is how the build logs looks like currently:

```sh
$ x build
Building bootstrap
   Compiling bootstrap v0.0.0 (/home/nimda/devspace/onur-ozkan/rust/src/bootstrap)
    Finished `dev` profile [unoptimized] target(s) in 3.43s
WARNING: no codegen-backends config matched the requested path to build a codegen backend. HELP: add backend to codegen-backends in config.toml.
WARNING: creating symbolic link `/home/nimda/devspace/.other/rustc-builds/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/rustc-src/rust` to `/home/nimda/devspace/onur-ozkan/rust` failed with File exists (os
error 17)
Creating a sysroot for stage2 compiler (use `rustup toolchain link 'name' build/host/stage2`)
WARNING: creating symbolic link `/home/nimda/devspace/.other/rustc-builds/build/x86_64-unknown-linux-gnu/ci-rustc-sysroot/lib/rustlib/rustc-src/rust` to `/home/nimda/devspace/onur-ozkan/rust` failed with File e
xists (os error 17)
Building tool rustdoc (stage1 -> stage2, x86_64-unknown-linux-gnu)
   Compiling rustdoc v0.0.0 (/home/nimda/devspace/onur-ozkan/rust/src/librustdoc)
   Compiling rustdoc-tool v0.0.0 (/home/nimda/devspace/onur-ozkan/rust/src/tools/rustdoc)
    Finished `release` profile [optimized + debuginfo] target(s) in 13.57s
Build completed successfully in 0:00:17
```

This PR removes artifact linking warnings and only shows the codegen-backend warning if explicitly called or during Dist or Install steps.
2024-06-23 22:38:59 +02:00
Matthias Krüger 0eff9fb05a
Rollup merge of #126612 - ehuss:build-manifest-readme, r=Mark-Simulacrum
Update outdated README in build-manifest.

I believe this was changed a while ago in https://github.com/rust-lang/promote-release/pull/14.
2024-06-23 22:38:58 +02:00
Matthias Krüger f016552b1c
Rollup merge of #126230 - onur-ozkan:followup-126225, r=Mark-Simulacrum
tidy: skip submodules if not present for non-CI environments

Right now tidy requires rustc-perf to be fetched as it checks its license, but this doesn't make sense for most contributors since rustc-perf is a dist-specific tool and its license will not change frequently, especially during compiler development. This PR makes tidy to skip rustc-perf if it's not fetched and if it's not running in CI.

Applies https://github.com/rust-lang/rust/pull/126225#issuecomment-2158143674 and reverts #126225.
2024-06-23 22:38:58 +02:00
bors 33422e72c8 Auto merge of #126865 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2024-06-23 17:11:16 +00:00
bors aabbf84b45 Auto merge of #123088 - tgross35:f16-f128-pattern-analysis, r=Nadrieril
Replace `f16` and `f128` pattern matching stubs with real implementations

This section of code depends on `rustc_apfloat` rather than our internal types, so this is one potential ICE that we should be able to melt now.

r? `@Nadrieril`
2024-06-23 14:14:48 +00:00
Chris Denton b8a0030358
Add need-symlink directive to compiletest 2024-06-23 13:42:52 +00:00
bors c3d7fb3985 Auto merge of #124733 - workingjubilee:cant-beleaf-we-dont-have-this, r=saethlin
Support `-Cforce-frame-pointers=non-leaf`

Why don't we already support this...?

Suggested impl for https://github.com/rust-lang/compiler-team/issues/744
2024-06-23 11:12:11 +00:00
Trevor Gross 28ce7cd03e Change a fixed crash test to a standard test
Fixes <https://github.com/rust-lang/rust/issues/122587>
2024-06-23 04:28:42 -05:00
Trevor Gross 6fb6c19c96 Replace f16 and f128 pattern matching stubs with real implementations
This section of code depends on `rustc_apfloat` rather than our internal
types, so this is one potential ICE that we should be able to melt now.

This also fixes some missing range and match handling in `rustc_middle`.
2024-06-23 04:28:42 -05:00
Jubilee Young 761ba5bb07 compiler: parse the empty frame-pointer 2024-06-23 02:22:55 -07:00
bors 05468cf124 Auto merge of #126855 - matthiaskrgr:rollup-ap5m2l6, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #126720 (Ignore `branch-protection-check-IBT` run-make test)
 - #126779 (Try to clarify the confusingly-named `RustDev` and `RustcDev` steps)
 - #126782 (Support absolute source paths in bootstrap)
 - #126783 (Fix issue number for the `tcplistener_into_incoming` feature)
 - #126843 (Allow "C-unwind" fn to have C variadics)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-23 08:57:00 +00:00
Matthias Krüger 9459fc20d7
Rollup merge of #126843 - workingjubilee:allow-variadics-in-c-unwind, r=nnethercote
Allow "C-unwind" fn to have C variadics

Fixes #126836
2024-06-23 09:45:30 +02:00
Matthias Krüger 08d2fc7c51
Rollup merge of #126783 - tguichaoua:fix_tcplistener_into_incoming_issue_number, r=workingjubilee
Fix issue number for the `tcplistener_into_incoming` feature

As per [this comment](https://github.com/rust-lang/rust/pull/88339#discussion_r922899044), the issue number for the `tcplistener_into_incoming` feature is the one of the PR that implements it instead of the tracking issue.

- https://github.com/rust-lang/rust/pull/88339
- https://github.com/rust-lang/rust/issues/88373
2024-06-23 09:45:29 +02:00
Matthias Krüger 92af6703b8
Rollup merge of #126782 - mtilda:mtilda/patch/x-test-with-absolute-paths, r=onur-ozkan
Support absolute source paths in bootstrap

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

`x test [PATHS]` should work when each path

1. Is the name of a build step, such as `tidy` in `x test tidy` or
2. Points to an existing file that is a descendant of the builder's source directory (root of this repository).
2024-06-23 09:45:29 +02:00
Matthias Krüger 98cc130cf4
Rollup merge of #126779 - Zalathar:rust-dev, r=Kobzol
Try to clarify the confusingly-named `RustDev` and `RustcDev` steps

When trying to track down how the downloaded LLVM gets built and bundled, I was greatly confused by these step names.

I wasn't sure whether I could just rename them (since they correspond to the filename of the resulting tarball), but I at least wanted to leave behind some signposts to reduce confusion.
2024-06-23 09:45:28 +02:00
Matthias Krüger 4a94e8089d
Rollup merge of #126720 - Rejyr:migrate-branch-protection-rmake, r=jieyouxu
Ignore `branch-protection-check-IBT` run-make test

The old Makefile implementation (#110304) had an improper comparison which caused the test to never run. However, both the updated Makefile implementation and the rmake implementation fail (missing `.note.gnu.property`). This could be a bug in the original implementation or test flakiness.

Edit: Manually recreating the test case shows that `.note.gnu.property` does not appear in nightly.
```rust
// main.rs
fn main() {
    println!("hello world");
}
```
```sh
$ rustc +nightly -V
rustc 1.81.0-nightly (c1b336cb6 2024-06-21)
$ rustc +stable -V
rustc 1.79.0 (129f3b996 2024-06-10)
```
```sh
$ rustc +nightly -Zcf-protection=branch -Clink-args=-nostartfiles -Csave-temps "-L$PWD" main.rs -o main
$ llvm-readobj --elf-output-style=GNU -nW main
Displaying notes found in: .note.gnu.build-id
  Owner                Data size        Description
  GNU                  0x00000008       NT_GNU_BUILD_ID (unique build ID bitstring)
    Build ID: bcae34e6431b2a37
```
Compiling without the other flags still does not show `.note.gnu.property`.
```sh
$ rustc +nightly main.rs -o main
$ llvm-readobj --elf-output-style=GNU -nW main
Displaying notes found in: .note.ABI-tag
  Owner                Data size        Description
  GNU                  0x00000010       NT_GNU_ABI_TAG (ABI version tag)
    OS: Linux, ABI: 4.4.0

Displaying notes found in: .note.gnu.build-id
  Owner                Data size        Description
  GNU                  0x00000008       NT_GNU_BUILD_ID (unique build ID bitstring)
    Build ID: d60d5f108b63bf3a
```
Compiling on stable shows `.note.gnu.property`.
```sh
$ rustc +stable main.rs -o main
$ llvm-readobj --elf-output-style=GNU -nW main
Displaying notes found in: .note.gnu.property
  Owner                Data size        Description
  GNU                  0x00000010       NT_GNU_PROPERTY_TYPE_0 (property note)
    Properties:    x86 ISA needed: x86-64-baseline

Displaying notes found in: .note.gnu.build-id
  Owner                Data size        Description
  GNU                  0x00000014       NT_GNU_BUILD_ID (unique build ID bitstring)
    Build ID: 4a494eb578123314e6ff1caf1c8877e27004664f

Displaying notes found in: .note.ABI-tag
  Owner                Data size        Description
  GNU                  0x00000010       NT_GNU_ABI_TAG (ABI version tag)
    OS: Linux, ABI: 4.4.0
```

Part of #121876.

r? `@jieyouxu`
2024-06-23 09:45:27 +02:00
Jubilee Young c72a6ad8f2 test: ignore force-frame-pointers test on some targets
all of these currently force stronger frame pointers, and
currently the CLI does not override the target
2024-06-23 00:40:43 -07:00
Jubilee Young 598e265d43 compiler: Accept -Cforce-frame-pointers=always
Also lands behind -Zunstable-options, for now.
Take the opportunity to do some mild cleanup.
2024-06-23 00:36:34 -07:00
Jubilee Young 7d160ae61a compiler: Support nightly -Cforce-frame-pointers=non-leaf
Requires -Zunstable-options as this is a -C flag already.
2024-06-23 00:36:34 -07:00
Jubilee Young f301d087d4 test: for frame-pointer=non-leaf codegen opts 2024-06-23 00:36:33 -07:00
Jubilee Young 79416c4118 cg_clif: Define build opts from FramePointer 2024-06-23 00:36:33 -07:00
Jubilee Young b3a1975cdc compiler(nfc): -Cforce-frame-pointers is a FramePointer 2024-06-23 00:36:33 -07:00
Jubilee Young 7c0b5cf99f compiler: Add FramePointer::ratchet 2024-06-23 00:36:33 -07:00
Jubilee Young 43a6b018a2 compiler: Mention C-unwind in C-variadic error 2024-06-22 23:30:31 -07:00
Nicholas Nethercote e2aa38e6ab Rework pattern and expression nonterminal kinds.
Merge `PatParam`/`PatWithOr`, and `Expr`/`Expr2021`, for a few reasons.

- It's conceptually nice, because the two pattern kinds and the two
  expression kinds are very similar.

- With expressions in particular, there are several places where both
  expression kinds get the same treatment.

- It removes one unreachable match arm.

- Most importantly, for #124141 I will need to introduce a new type
  `MetaVarKind` that is very similar to `NonterminalKind`, but records a
  couple of extra fields for expression metavars. It's nicer to have a
  single `MetaVarKind::Expr` expression variant to hold those extra
  fields instead of duplicating them across two variants
  `MetaVarKind::{Expr,Expr2021}`. And then it makes sense for patterns
  to be treated the same way, and for `NonterminalKind` to also be
  treated the same way.

I also clarified the comments, because I have long found them a little
hard to understand.
2024-06-23 15:57:24 +10:00
bors d4cc01c2f2 Auto merge of #126715 - Rejyr:migrate-readelf-rmake, r=jieyouxu
Migrate `relro-levels`, `static-pie` to `rmake`

Part of #121876.

r? `@jieyouxu`

try-job: aarch64-gnu
try-job: arm-android
try-job: armhf-gnu
try-job: dist-i586-gnu-i586-i686-musl
try-job: dist-various-1
try-job: test-various
2024-06-23 03:43:25 +00:00
Mathilda 57cb0e23d9 Support absolute PATHS in x.py test [PATHS] 2024-06-22 23:33:52 -04:00
Zalathar 16cf2682ee Try to clarify the confusingly-named RustDev and RustcDev steps 2024-06-23 11:31:21 +10:00
bors acb62737ac Auto merge of #126842 - calebcartwright:sync-from-rustfmt-24-06, r=calebcartwright
rustfmt subtree update

r? ghost
2024-06-23 00:42:26 +00:00
Jerry Wang 75a9379c0f
(wip) Migrate branch-protection-check-IBT to rmake 2024-06-22 20:18:02 -04:00
Jerry Wang a19077d0f3
Enable cross compilation on run-make/relro-levels 2024-06-22 19:44:51 -04:00
Jubilee Young 26dccadb47 Allow "C-unwind" fn to have C variadics 2024-06-22 15:14:14 -07:00
Nicholas Nethercote 70fa67c0b2 Tweak some ugly formatting. 2024-06-23 08:13:41 +10:00
Nicholas Nethercote 470b0e9c3c Import NonterminalKind in compiler/rustc_expand/src/mbe/quoted.rs.
So we can omit the `token::` qualifier, which gives more space to some
cramped code.
2024-06-23 08:11:54 +10:00
Caleb Cartwright ffad9842bd update rustfmt version 2024-06-22 16:22:00 -05:00
Caleb Cartwright 53608bece0 fix bad merge conflict resolution 2024-06-22 16:21:14 -05:00
bors 3cb521a434 Auto merge of #126761 - GuillaumeGomez:unsafe_extern_blocks, r=spastorino
rustdoc: Add support for `missing_unsafe_on_extern` feature

Follow-up of https://github.com/rust-lang/rust/pull/124482.

Not sure if the `safe` keyword is supposed to be displayed or not though? For now I didn't add it in the generated doc, only `unsafe` as usual.

cc `@spastorino`
r? `@fmease`
2024-06-22 20:59:00 +00:00
Michael Goulet 97b7874a3c Fix rustfmt 2024-06-22 15:41:51 -05:00
Caleb Cartwright fc2cca942f Merge commit 'e4944185ae09c99f59b460e358909f329010ea9c' into sync-from-rustfmt-24-06 2024-06-22 15:33:45 -05:00
bors a0f01c3c10 Auto merge of #126838 - matthiaskrgr:rollup-qkop22o, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #126140 (Rename `std::fs::try_exists` to  `std::fs::exists` and stabilize fs_try_exists)
 - #126318 (Add a `x perf` command for integrating bootstrap with `rustc-perf`)
 - #126552 (Remove use of const traits (and `feature(effects)`) from stdlib)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-22 18:48:10 +00:00
Jerry Wang c69770d730
Migrate static-pie scripts to rmake 2024-06-22 14:15:23 -04:00
Jerry Wang f90d4e4371
Migrate static-pie to rmake 2024-06-22 14:15:22 -04:00