Commit Graph

154065 Commits

Author SHA1 Message Date
Jieyou Xu
fcba961db7 ci: liberate aarch64-gnu-debug from the shackles of --test-args=clang
And run all eligible run-make tests.
2024-11-12 16:20:17 +08:00
bors
5700240aff Auto merge of #132943 - matthiaskrgr:rollup-164l3ej, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #132651 (Remove attributes from generics in built-in derive macros)
 - #132668 (Feature gate yield expressions not in 2024)
 - #132771 (test(configure): cover `parse_args` in `src/bootstrap/configure.py`)
 - #132895 (Generalize `NonNull::from_raw_parts` per ACP362)
 - #132914 (Update grammar in std::cell docs.)
 - #132927 (Consolidate type system const evaluation under `traits::evaluate_const`)
 - #132935 (Make sure to ignore elided lifetimes when pointing at args for fulfillment errors)
 - #132941 (Subtree update of `rust-analyzer`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-12 08:15:38 +00:00
Matthias Krüger
38c2db4020
Rollup merge of #132941 - lnicola:sync-from-ra2, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2024-11-12 08:07:20 +01:00
Matthias Krüger
ea61714d52
Rollup merge of #132927 - BoxyUwU:consolidate_type_system_const_eval, r=compiler-errors
Consolidate type system const evaluation under `traits::evaluate_const`

Part of #130704

Fixes #128232
Fixes #118545

Removes `ty::Const::{normalize_internal, eval_valtree}` and `InferCtxt::(try_)const_eval_resolve`, consolidating the associated logic into `evaluate_const` in `rustc_trait_selection`. This results in an API for `ty::Const` that is free of any normalization/evaluation functions that would be incorrect to use under `min_generic_const_args`/`associated_const_equality`/`generic_const_exprs` or, more generally, that would be incorrect to use in the presence of generic type system constants.

Moving this logic to `rustc_trait_selection` and out of `rustc_middle` is also a pre-requisite for ensuring that we do not evaluate constants whose where clauses do not hold.

From this point it should be relatively simple (hah) to implement more complex normalization of type system constants such as: checking wf'ness before invoking CTFE machinery, or being able to normalize const aliases that still refer to generic parameters.

r? `@compiler-errors`
2024-11-12 08:07:18 +01:00
Matthias Krüger
3a0cc81ca3
Rollup merge of #132771 - ismailarilik:test/configure/cover-parse-args-in-src-bootstrap-configure-py, r=onur-ozkan
test(configure): cover `parse_args` in `src/bootstrap/configure.py`

I was reading `src/bootstrap/configure.py` and `parse_args` function there seems complex. So I added some tests to cover it and prevent regressions.
2024-11-12 08:07:16 +01:00
Matthias Krüger
52bb9fafd0
Rollup merge of #132793 - ehuss:update-mdbook, r=Mark-Simulacrum
Update mdbook to 0.4.42

This updates mdbook to 0.4.42
Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0441

There were some significant changes that I would like to get early testing on.

This also updates rust-by-example which was required due to an update to the theme file.
2024-11-12 06:27:18 +01:00
ismailarilik
1ba72db242 test(configure): cover parse_args in src/bootstrap/configure.py 2024-11-12 07:28:23 +03:00
Boxy
bea0148ac6 Consolidate type system const evaluation under traits::evaluate_const
mew
2024-11-12 02:54:03 +00:00
Josh Stone
fc83c8a178 ci: Enable full debuginfo-level=2 in DEPLOY_ALT
It will be slower to build and produce larger artifacts, but hopefully
it will help catch debuginfo regressions sooner, especially for problems
that LLVM assertions would uncover.
2024-11-11 13:10:05 -08:00
bors
81eef2d362 Auto merge of #132902 - matthiaskrgr:rollup-43qgg3t, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #129627 (Ensure that tail expr receive lifetime extension)
 - #130999 (Implement file_lock feature)
 - #132873 (handle separate prefixes in clippy rules)
 - #132891 (Remove `rustc_session::config::rustc_short_optgroups`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-11 19:25:06 +00:00
bors
de27914e8e Auto merge of #132720 - jieyouxu:do-not-strip, r=davidtwco
Only copy, rename and link `llvm-objcopy` if llvm tools are enabled

Fixes #132719.

cc `@bjorn3` who reported the bootstrapping problem for cg_clif.
cc `@davidtwco` in case this might be problematic for linux -> macOS cross-compile builds, but seems very unlikely.
cc `@albertlarsan68` (co-reviewed #131405)

r? bootstrap
2024-11-11 16:07:15 +00:00
Kirill Bulatov
e646263abc Update the file hash 2024-11-11 16:06:55 +01:00
Kirill Bulatov
572ae698be Use completion item indices instead of property matching when searching for the completion item to resolve 2024-11-11 15:50:04 +01:00
León Orell Valerian Liehr
46603166d7
[perf] rustdoc: Perform less work when cleaning parenthesized generic args 2024-11-11 15:35:30 +01:00
Matthias Krüger
7319666923
Rollup merge of #132873 - onur-ozkan:132867, r=jieyouxu
handle separate prefixes in clippy rules

Fixes https://github.com/rust-lang/rust/issues/132867
2024-11-11 15:23:33 +01:00
bors
d4822c2d84 Auto merge of #127589 - notriddle:notriddle/search-sem-3, r=GuillaumeGomez
rustdoc-search: simplify rules for generics and type params

**Heads up!**: This PR is a follow-up that depends on #124544. It adds 12dc24f460, a change to the filtering behavior, and 9900ea48b5, a minor ranking tweak.

Part of https://github.com/rust-lang/rust-project-goals/issues/112

This PR overturns https://github.com/rust-lang/rust/pull/109802

## Preview

* no results: [`Box<[A]> -> Vec<B>`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=Box%3C%5BA%5D%3E%20-%3E%20Vec%3CB%3E)
* results: [`Box<[A]> -> Vec<A>`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=Box%3C%5BA%5D%3E%20-%3E%20Vec%3CA%3E)
* [`T -> U`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3/std/index.html?search=T%20-%3E%20U)
* [`Cx -> TyCtxt`](http://notriddle.com/rustdoc-html-demo-12/search-sem-3-compiler/rustdoc/index.html?search=Cx%20-%3E%20TyCtxt)

![image](https://github.com/user-attachments/assets/015ae28c-7469-4f7f-be03-157d28d7ec97)

## Description

This commit is a response to feedback on the displayed type signatures results, by making generics act stricter.

- Order within generics is significant. This means `Vec<Allocator>` now matches only with a true vector of allocators, instead of matching the second type param. It also makes unboxing within generics stricter, so `Result<A, B>` only matches if `B` is in the error type and `A` is in the success type. The top level of the function search is unaffected.
- Generics are only "unboxed" if a type is explicitly opted into it. References and tuples are hardcoded to allow unboxing, and Box, Rc, Arc, Option, Result, and Future are opted in with an unstable attribute. Search result unboxing is the process that allows you to search for `i32 -> str` and get back a function with the type signature `&Future<i32> -> Box<str>`.
- Instead of ranking by set overlap, it ranks by the number of items in the type signature. This makes it easier to find single type signatures like transmute.

## Find the discussion on

* <https://rust-lang.zulipchat.com/#narrow/stream/393423-t-rustdoc.2Fmeetings/topic/meeting.202024-07-08/near/449965149>
* <https://github.com/rust-lang/rust/pull/124544#issuecomment-2204272265>
* <https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/deciding.20on.20semantics.20of.20generics.20in.20rustdoc.20search>
2024-11-11 12:26:00 +00:00
onur-ozkan
4dfc05237f Revert "do not trust download-rustc=if-unchanged on CI for now"
This reverts commit b3c212103b.
2024-11-11 11:19:14 +03:00
onur-ozkan
bc7531089e move src/tools/build_helper into src/build_helper
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-11 11:19:11 +03:00
onur-ozkan
6b38a159e5 reduce RUSTC_IF_UNCHANGED_ALLOWED_PATHS significantly
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-11 11:19:01 +03:00
Laurențiu Nicola
c2ffafdc9a
Merge pull request #18482 from regexident/hir_trait_supertraits_accessors
internal: Add public `direct_supertraits(…)` & `all_supertraits(…)` accessor methods to `hir::Trait`
2024-11-11 06:58:17 +00:00
Henry Jiang
405017ac35 refactor flags 2024-11-10 21:52:18 -05:00
bors
42b2496320 Auto merge of #126597 - estebank:unicode-output, r=fmease
Add Unicode block-drawing compiler output support

Add nightly-only theming support to rustc output using Unicode box
drawing characters instead of ASCII-art to draw the terminal UI.

In order to enable, the flags `-Zunstable-options=yes --error-format=human-unicode` must be passed in.

After:

```
error: foo
  ╭▸ test.rs:3:3
  │
3 │       X0 Y0 Z0
  │   ┌───╿──│──┘
  │  ┌│───│──┘
  │ ┏││━━━┙
  │ ┃││
4 │ ┃││   X1 Y1 Z1
5 │ ┃││   X2 Y2 Z2
  │ ┃│└────╿──│──┘ `Z` label
  │ ┃└─────│──┤
  │ ┗━━━━━━┥  `Y` is a good letter too
  │        `X` is a good letter
  ╰╴
note: bar
  ╭▸ test.rs:4:3
  │
4 │ ┏   X1 Y1 Z1
5 │ ┃   X2 Y2 Z2
6 │ ┃   X3 Y3 Z3
  │ ┗━━━━━━━━━━┛
  ├ note: bar
  ╰ note: baz
note: qux
  ╭▸ test.rs:4:3
  │
4 │   X1 Y1 Z1
  ╰╴  ━━━━━━━━
```

Before:

```
error: foo
 --> test.rs:3:3
  |
3 |       X0 Y0 Z0
  |    ___^__-__-
  |   |___|__|
  |  ||___|
  | |||
4 | |||   X1 Y1 Z1
5 | |||   X2 Y2 Z2
  | |||____^__-__- `Z` label
  | ||_____|__|
  | |______|  `Y` is a good letter too
  |        `X` is a good letter
  |
note: bar
 --> test.rs:4:3
  |
4 | /   X1 Y1 Z1
5 | |   X2 Y2 Z2
6 | |   X3 Y3 Z3
  | |__________^
  = note: bar
  = note: baz
note: qux
 --> test.rs:4:3
  |
4 |   X1 Y1 Z1
  |   ^^^^^^^^
```

After:

![rustc output with unicode box drawing characters](https://github.com/rust-lang/rust/assets/1606434/d210b79a-6579-4407-9706-ba8edc6e9f25)

Before:
![current rustc output with ASCII art](https://github.com/rust-lang/rust/assets/1606434/5aecccf8-a6ee-4469-8b39-72fb0d979a9f)
2024-11-11 00:00:58 +00:00
Esteban Küber
1d78004575
Add Unicode block-drawing compiler output support
Add nightly-only theming support to rustc output using Unicode box
drawing characters instead of ASCII-art to draw the terminal UI:

After:

```
error: foo
  ╭▸ test.rs:3:3
  │
3 │       X0 Y0 Z0
  │   ┌───╿──│──┘
  │  ┌│───│──┘
  │ ┏││━━━┙
  │ ┃││
4 │ ┃││   X1 Y1 Z1
5 │ ┃││   X2 Y2 Z2
  │ ┃│└────╿──│──┘ `Z` label
  │ ┃└─────│──┤
  │ ┗━━━━━━┥  `Y` is a good letter too
  │        `X` is a good letter
  ╰╴
note: bar
  ╭▸ test.rs:4:3
  │
4 │ ┏   X1 Y1 Z1
5 │ ┃   X2 Y2 Z2
6 │ ┃   X3 Y3 Z3
  │ ┗━━━━━━━━━━┛
  ├ note: bar
  ╰ note: baz
note: qux
  ╭▸ test.rs:4:3
  │
4 │   X1 Y1 Z1
  ╰╴  ━━━━━━━━
```

Before:

```
error: foo
 --> test.rs:3:3
  |
3 |       X0 Y0 Z0
  |    ___^__-__-
  |   |___|__|
  |  ||___|
  | |||
4 | |||   X1 Y1 Z1
5 | |||   X2 Y2 Z2
  | |||____^__-__- `Z` label
  | ||_____|__|
  | |______|  `Y` is a good letter too
  |        `X` is a good letter
  |
note: bar
 --> test.rs:4:3
  |
4 | /   X1 Y1 Z1
5 | |   X2 Y2 Z2
6 | |   X3 Y3 Z3
  | |__________^
  = note: bar
  = note: baz
note: qux
 --> test.rs:4:3
  |
4 |   X1 Y1 Z1
  |   ^^^^^^^^
```
2024-11-10 23:57:18 +01:00
Matthias Krüger
cdb76c77ac
Rollup merge of #131781 - taiki-e:arm64ec-stabilize-asm, r=Amanieu,traviscross
Stabilize Arm64EC inline assembly

This stabilizes inline assembly for Arm64EC ("Emulation Compatible").

Corresponding reference PR: https://github.com/rust-lang/reference/pull/1653

---

From the requirements of stabilization mentioned in https://github.com/rust-lang/rust/issues/93335

> Each architecture needs to be reviewed before stabilization:

> - It must have clobber_abi.

Done in https://github.com/rust-lang/rust/pull/131332.

> - It must be possible to clobber every register that is normally clobbered by a function call.

This is possible from the time of the initial implementation.

> - Generally review that the exposed register classes make sense.

The registers available in this target are a subset of those available in the AArch64 inline assembly which is already stable.

The following registers cannot be used in Arm64EC compared to AArch64:

- `x13`, `x14`, `x23`, `x24`, `x28` (register class: `reg`)
- `v[16-31]` (register class: `vreg`)
- `p[0-15]`, `ffr` (clobber-only register class `preg`)

These are disallowed by the ABI (see also [abi docs](https://learn.microsoft.com/en-us/cpp/build/arm64ec-windows-abi-conventions?view=msvc-170#register-mapping) for `reg`/`vreg` and https://github.com/rust-lang/rust/pull/131332#issuecomment-2401189142 for `preg`).

Although not listed in the above requirements, preserves_flags is also implemented and the same as AArch64.

---

cc `@dpaoliello`

r? `@Amanieu`

`@rustbot` label O-windows O-AArch64 +A-inline-assembly +T-lang -T-compiler +needs-fcp
2024-11-10 22:20:34 +01:00
onur-ozkan
a00fd7a965 warn about "src/bootstrap" on RUSTC_IF_UNCHANGED_ALLOWED_PATHS
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-10 23:14:39 +03:00
onur-ozkan
72e63e3ad5 add test coverage for RUSTC_IF_UNCHANGED_ALLOWED_PATHS
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-10 23:12:00 +03:00
onur-ozkan
baa95efa7a use allowed "if-unchanged" logic for compiler builds
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-10 23:11:47 +03:00
onur-ozkan
469c8baab8 add test coverage for separate clippy prefixes
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-10 23:07:00 +03:00
onur-ozkan
6643586a1d handle separate prefixes in clippy args
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-10 23:06:42 +03:00
Laurențiu Nicola
a11877735c
Merge pull request #18492 from samestep/docs-dev-no-design-label
Replace Design label with C-Architecture
2024-11-10 18:46:57 +00:00
Sam Estep
29f84262a4 Replace with C-Architecture 2024-11-10 13:34:26 -05:00
bors
2128d8df0e Auto merge of #132863 - matthiaskrgr:rollup-1zbjz5f, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #132675 (coverage: Restrict empty-span expansion to only cover `{` and `}`)
 - #132849 (Miri subtree update)
 - #132858 (Update minifer version to `0.3.2`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-10 18:06:48 +00:00
Matthias Krüger
ba09426968
Rollup merge of #132858 - GuillaumeGomez:update-minifier, r=aDotInTheVoid
Update minifer version to `0.3.2`

This version fixes a few lints but the main change is that it makes `clap` dependency optional since it's only used for the binary.

r? `@notriddle`
2024-11-10 17:43:08 +01:00
Matthias Krüger
2681dcb189
Rollup merge of #132849 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2024-11-10 17:43:07 +01:00
Guillaume Gomez
bc1c4be2fd Update minifer version to 0.3.2 2024-11-10 16:32:22 +01:00
Ralf Jung
b3c212103b do not trust download-rustc=if-unchanged on CI for now 2024-11-10 16:28:52 +01:00
Jieyou Xu
c0cee4e36b Revert "Rollup merge of #132772 - onur-ozkan:download-rustc-default, r=jieyouxu"
This reverts commit c435fa8c4b, reversing
changes made to 88acd493f9.

Seems to have unintentionally omitted commit hash leading to
<https://github.com/rust-lang/rust/pull/132772>.
2024-11-10 20:31:18 +08:00
Ralf Jung
e8a3ffee49 fix linux-futex test being accidentally disabled 2024-11-10 12:36:40 +01:00
Ralf Jung
d1a4812164 store futexes in per-allocation data rather than globally 2024-11-10 11:01:57 +01:00
Ralf Jung
e96808162a ensure that all publicly reachable const fn have const stability info 2024-11-10 10:16:26 +01:00
Ralf Jung
a01f37c7f4 Merge from rustc 2024-11-10 10:03:57 +01:00
Ralf Jung
ce7a56072b Preparing for merge from rustc 2024-11-10 10:01:05 +01:00
Taiki Endo
965a2801a0 Stabilize Arm64EC inline assembly 2024-11-10 17:43:46 +09:00
Jubilee
b93b0c7011
Rollup merge of #132824 - kadenlnelson:patch/wasi-c-abi-doc, r=workingjubilee
Update grammar in wasm-c-abi's compiler flag documentation

This PR adjusts the grammar of the `wasm-c-abi` compiler flag documentation. See the inline comments within the PR for details.
2024-11-09 20:28:45 -08:00
Jubilee
61f51931b2
Rollup merge of #132801 - RalfJung:alloc-mutability, r=oli-obk
interpret: get_alloc_info: also return mutability

This will be needed for https://github.com/rust-lang/miri/pull/3971

This then tuned into a larger refactor where we introduce a new type for the `get_alloc_info` return data, and we move some code to methods on `GlobalAlloc` to avoid duplicating it between the validity check and `get_alloc_info`.
2024-11-09 20:28:43 -08:00
Jubilee
2f98dcf9ba
Rollup merge of #131258 - taiki-e:s390x-stabilize-asm, r=Amanieu
Stabilize s390x inline assembly

This stabilizes inline assembly for s390x (SystemZ).

Corresponding reference PR: https://github.com/rust-lang/reference/pull/1643

---

From the requirements of stabilization mentioned in https://github.com/rust-lang/rust/issues/93335

> Each architecture needs to be reviewed before stabilization:

> - It must have clobber_abi.

Done in https://github.com/rust-lang/rust/pull/130630.

> - It must be possible to clobber every register that is normally clobbered by a function call.

Done in the PR that added support for clobber_abi.

> - Generally review that the exposed register classes make sense.

The followings can be used as input/output:

- `reg` (`r[0-10]`, `r[12-14]`): General-purpose register

- `reg_addr` (`r[1-10]`, `r[12-14]`): General-purpose register except `r0` which is evaluated as zero in an address context

  This class is needed because `r0`, which may be allocated when using the `reg` class, cannot be used as a register in certain contexts. This is identical to the `a` constraint in LLVM and GCC. See https://github.com/rust-lang/rust/pull/119431 for details.

- `freg` (`f[0-15]`): Floating-point register

The followings are clobber-only:

- `vreg` (`v[0-31]`): Vector register

  Technically `vreg` should be able to accept `#[repr(simd)]` types as input/output if the unstable `vector` target feature added is enabled, but `core::arch` has no s390x vector type and both `#[repr(simd)]` and `core::simd` are unstable. Everything related is unstable, so the fact that this is currently a clobber-only should not be considered a stabilization blocker. (https://github.com/rust-lang/rust/issues/130869 tracks unstable stuff here)

- `areg` (`a[2-15]`): Access register

All of the above register classes except `reg_addr` are needed for `clobber_abi`.

The followings cannot be used as operands for inline asm (see also [getReservedRegs](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp#L258-L282) and [SystemZELFRegisters](https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h#L107-L128) in LLVM):

- `r11`: frame pointer
- `r15`: stack pointer
- `a0`, `a1`: Reserved for system use
- `c[0-15]` (control register)  Reserved by the kernel

Although not listed in the above requirements, `preserves_flags` is implemented in https://github.com/rust-lang/rust/pull/111331.

---

cc ``@uweigand``

r? ``@Amanieu``

``@rustbot`` label +O-SystemZ +A-inline-assembly
2024-11-09 20:28:43 -08:00
Kaden Nelson
2ac1c1868f Update grammar in wasm-c-abi's compiler flag documentation
Co-authored-by: Jubilee <workingjubilee@gmail.com>
2024-11-09 22:27:21 -06:00
bors
303fc0527a Auto merge of #132829 - weihanglo:update-cargo, r=weihanglo
Update cargo

16 commits in 0310497822a7a673a330a5dd068b7aaa579a265e..4a2d8dc636445b276288543882e076f254b3ae95
2024-11-01 19:27:56 +0000 to 2024-11-09 19:10:33 +0000
- test: adjust `cargo_test_env` to unblock rust submodule update (rust-lang/cargo#14803)
- feat(warnings): add build.warnings option (rust-lang/cargo#14388)
- Revert "feat: Add `CARGO_RUSTC_CURRENT_DIR`" (rust-lang/cargo#14799)
- CI: make the `lint-docs` job required (rust-lang/cargo#14797)
- Switch CI from bors to merge queue (rust-lang/cargo#14718)
- docs(test):  Document Execs assertions based on port effort (rust-lang/cargo#14793)
- fix(test): Make redactions consistent with snapbox (rust-lang/cargo#14790)
- test(gc): Update remaining unordered tests to snapbox (rust-lang/cargo#14785)
- Normalize the `target` paths (rust-lang/cargo#14497)
- rustfix: replace special-case duplicate handling with error (rust-lang/cargo#14782)
- test: Update some emaining unordered tests to snapbox (rust-lang/cargo#14781)
- Change config paths to only check CARGO_HOME for cargo-script (rust-lang/cargo#14749)
- Enable transfer feature in triagebot (rust-lang/cargo#14777)
- Add transactional semantics to `rustfix` (rust-lang/cargo#14747)
- doc: fix `GlobalContext` reference (rust-lang/cargo#14773)
- chore: update handlebars to v6, fix build error (rust-lang/cargo#14772)
2024-11-10 00:23:56 +00:00
Weihang Lo
be30861174
Update cargo 2024-11-09 18:12:21 -05:00
Matthias Krüger
c435fa8c4b
Rollup merge of #132772 - onur-ozkan:download-rustc-default, r=jieyouxu
use `download-rustc="if-unchanged"` as a global default

If `download-rustc` isn't explicitly set and the source is Git-managed, it should be totally okay to utilize "if-unchanged" behaviour. The "dist" profile already sets `download-rustc` to `false`, so this shouldn’t impact anything on CI.

This also resolves an unhandled case where `bootstrap` unexpectedly panics if `"if-unchanged"` was used with a non-Git source. Now we exits gracefully with an error message pointing the problem.
2024-11-09 19:16:45 +01:00
Matthias Krüger
88acd493f9
Rollup merge of #132754 - Zalathar:opts, r=GuillaumeGomez,jieyouxu
Simplify the internal API for declaring command-line options

The internal APIs for declaring command-line options are old, and intimidatingly complex. This PR replaces them with a single function that takes explicit `stability` and `kind` arguments, making it easier to see how each option is handled, and whether it is treated as stable or unstable.

We also don't appear to have any tests for the output of `rustc --help` and similar, so I've added a run-make test to verify that this PR doesn't change any output. (There is already a similar run-make test for rustdoc's help output.)

---

The librustdoc changes are simply adjusting to updated compiler APIs; no functional change intended.

---

A side-effect of these changes is that rustfmt can once again format the entirety of these option declaration lists, which it was not doing before.
2024-11-09 19:16:44 +01:00
Ralf Jung
4a54ec8c18 make return type of get_alloc_info a struct, and reduce some code duplication with validity checking 2024-11-09 15:18:52 +01:00
Ralf Jung
5ff90d069a
Merge pull request #4020 from RalfJung/thread-sope
pthread-sync test: use thread::scope for more reliable thread scoping
2024-11-09 10:16:25 +00:00
Ralf Jung
30a2ae6f05 interpret: get_alloc_info: also return mutability 2024-11-09 11:13:44 +01:00
Ralf Jung
fe398880e0 pthread-sync: avoid confusing error when running with preemption 2024-11-09 10:52:01 +01:00
The Miri Cronjob Bot
15d883e5b7 Merge from rustc 2024-11-09 05:12:46 +00:00
The Miri Cronjob Bot
beb8d6fac1 Preparing for merge from rustc 2024-11-09 05:04:45 +00:00
Maybe Lapkin
22069682ed Use a separate dir for r-a builds consistently in helix config 2024-11-09 01:27:29 +01:00
Eric Huss
544b9f9a94 Update mdbook to 0.4.42 2024-11-08 15:38:32 -08:00
onur-ozkan
2a381086bb fix core::config::tests::override_toml
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-08 20:25:54 +03:00
bors
59cec72a57 Auto merge of #132746 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2024-11-08 16:49:13 +00:00
Ralf Jung
d7aceeea71
Merge pull request #4004 from YohDeadfall/thread-name-ice-fix
Get/set thread name shims return errors for invalid handles
2024-11-08 15:19:51 +00:00
Yoh Deadfall
1254d8e75e Get/set thread name shims return errors for invalid handles 2024-11-08 17:54:10 +03:00
onur-ozkan
2e0afc8b71 respect to global download-rustc default in non-dist profiles
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-08 16:26:00 +03:00
onur-ozkan
cce6f03754 use download-rustc="if-unchanged" as default whenever possible
"whenever possible" means applying it if `download-rustc` isn't explicitly set and
the source is Git-managed.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-08 16:23:59 +03:00
onur-ozkan
76b6090df5 read repository information configs at an earlier stage
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-11-08 16:23:07 +03:00
Philipp Krones
0aafd6552b
Clippy: cfg out validate_diag on release builds 2024-11-08 10:49:54 +01:00
Ralf Jung
e3010e84db remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead 2024-11-08 09:16:00 +01:00
Master-Hash
ef8a0c0016
editors/code: Match supported debug engines in config with actual supported ones 2024-11-08 08:33:32 +01:00
Laurențiu Nicola
f9d7f6dd34
Merge pull request #18486 from Wilfred/update_minimum_vscode
editors/code: Change minimum VS Code from 1.78 to 1.83
2024-11-08 06:51:14 +00:00
Jubilee
a1c4d9e42f
Rollup merge of #132739 - GuillaumeGomez:cleanup-scrape-code, r=notriddle
Fix `librustdoc/scrape_examples.rs` formatting

Still working on the intra-doc link feature. This time I encountered this file and it bothered me a bit so fixing formatting. :3

r? ````@notriddle````
2024-11-07 18:48:25 -08:00
Jubilee
5b554613ed
Rollup merge of #132737 - clubby789:lock-no-pid, r=jieyouxu
bootstrap: Print better message if lock pid isn't available

Not actually sure why, but sometimes the PID isn't available so we print
```
WARNING: build directory locked by process , waiting for lock
```
This makes the message a bit nicer in this case
2024-11-07 18:48:24 -08:00
Jubilee
93e9ec05a9
Rollup merge of #131913 - jieyouxu:only_debug_assertions, r=onur-ozkan
Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support

Add `{ignore,needs}-{rustc,std}-debug-assertions` compiletest directives and retire the old `{ignore,only}-debug` directives. The old `{ignore,only}-debug` directives were ambiguous because you could have std built with debug assertions but rustc not built with debug assertions or vice versa. If we want to support the use case of controlling test run based on if rustc was built with debug assertions, then having `{ignore,only}-debug` will be very confusing.

cc ````@matthiaskrgr````

Closes #123987.

r? bootstrap (or compiler tbh)
2024-11-07 18:48:21 -08:00
Zalathar
b8377e5844 Simplify command-line-argument declarations in librustdoc 2024-11-08 12:46:39 +11:00
Zalathar
584c8200de Use a method to apply RustcOptGroup to getopts::Options 2024-11-08 12:46:39 +11:00
Zalathar
8f7f9b93b2 Add a run-make test for rustc --help and similar 2024-11-08 12:46:39 +11:00
Taiki Endo
ab62a352ba Stabilize s390x inline assembly 2024-11-08 10:46:00 +09:00
Philipp Krones
40aec58abb
Merge commit 'f712eb5cdccd121d0569af12f20e6a0fabe4364d' into clippy-subtree-update 2024-11-07 22:37:01 +01:00
bors
b91a3a0560 Auto merge of #132472 - taiki-e:sparc-asm, r=Amanieu
Basic inline assembly support for SPARC and SPARC64

This implements asm_experimental_arch (tracking issue https://github.com/rust-lang/rust/issues/93335) for SPARC and SPARC64.

This PR includes:

- General-purpose registers `r[0-31]` (`reg` register class, LLVM/GCC constraint `r`)
  Supported types: i8, i16, i32, i64 (SPARC64-only)
  Aliases: `g[0-7]` (`r[0-7]`), `o[0-7]` (`r[8-15]`), `l[0-7]` (`r[16-23]`), `i[0-7]` (`r[24-31]`)
- `y` register (clobber-only, needed for clobber_abi)
- preserves_flags: Integer condition codes (`icc`, `xcc`) and floating-point condition codes (`fcc*`)

The following are *not* included:

- 64-bit integer support on SPARC-V8+'s global or out registers (`g[0-7]`, `o[0-7]`): GCC's `h` constraint (it seems that there is no corresponding constraint in LLVM?)
- Floating-point registers (LLVM/GCC constraint `e`/`f`):
  I initially tried to implement this, but postponed it for now because there seemed to be several parts in LLVM that behaved differently than in the LangRef's description.
- clobber_abi: Support for floating-point registers is needed.

Refs:
- LLVM
  - Reserved registers https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp#L52
  - Register definitions https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Sparc/SparcRegisterInfo.td
  - Supported constraints https://llvm.org/docs/LangRef.html#supported-constraint-code-list
- GCC
  - Reserved registers 63b6967b06/gcc/config/sparc/sparc.h (L633-L658)
  - Supported constraints https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html
- SPARC ISA/ABI
  - (64-bit ISA) The SPARC Architecture Manual, Version 9
    (32-bit ISA) The SPARC Architecture Manual, Version 8
    (64-bit ABI) System V Application Binary Interface SPARC Version 9 Processor Supplement, Rev 1.35
    (32-bit ABI) System V Application Binary Interface SPARC Processor Supplement, Third Edition
    The above docs can be downloaded from https://sparc.org/technical-documents
  - (32-bit V8+ ABI) The V8+ Technical Specification
    https://temlib.org/pub/SparcStation/Standards/V8plus.pdf

cc `@thejpster` (sparc-unknown-none-elf target maintainer)
(AFAIK, other sparc/sprac64 targets don't have target maintainers)

r? `@Amanieu`

`@rustbot` label +O-SPARC +A-inline-assembly
2024-11-07 21:07:06 +00:00
clubby789
1ee5ab3085 bootstrap: Print better message if lock pid isn't available 2024-11-07 17:28:16 +00:00
Sam Estep
01726389fb Delete design label from list 2024-11-07 11:49:22 -05:00
Guillaume Gomez
9f5e17fd0a Fix file formatting 2024-11-07 17:13:00 +01:00
Laurențiu Nicola
668f3881d2
Merge pull request #18490 from ShoyuVanilla/dyn-compat-rename
minor: Rename `dyn compatible` to `dyn-compatible`
2024-11-07 14:21:40 +00:00
Shoyu Vanilla
902a2c5060 minor: Rename dyn compatible to dyn-compatible 2024-11-07 23:00:29 +09:00
bors
3d1dba830a Auto merge of #132722 - joboet:rollup-0q67jyo, r=joboet
Rollup of 6 pull requests

Successful merges:

 - #132057 (miri: update ABI compat checks to accept Option-like types)
 - #132665 (Implement `div_ceil` for `NonZero<unsigned>`)
 - #132694 (fix(x): fix a regex used to find python executable)
 - #132707 (Add --diagnostic-width to some tests failing after 1a0c502183)
 - #132715 (fix `LazyLock::get` and `LazyLock::get_mut` document)
 - #132716 (chore(issue-template): fix branch name)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-07 13:03:03 +00:00
Yoh Deadfall
dc62c34886 Renamed ecx variales to this 2024-11-07 15:36:52 +03:00
Taiki Endo
241f82ad91 Basic inline assembly support for SPARC and SPARC64 2024-11-07 21:19:03 +09:00
Jonas Böttiger
6b5a58c265
Rollup merge of #132057 - RalfJung:miri-abi-compat, r=wesleywiser
miri: update ABI compat checks to accept Option-like types

This implements the t-lang decision described [here](https://github.com/rust-lang/rust/pull/130628#issuecomment-2402761599).

Fixes https://github.com/rust-lang/miri/issues/3983
2024-11-07 13:08:27 +01:00
Jieyou Xu
cf9cec3d84 Only copy, rename and link llvm-objcopy if llvm tools are enabled
Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
2024-11-07 19:41:25 +08:00
bors
fe43131683 Auto merge of #132635 - kiike:fix/dots_in_target, r=onur-ozkan
bootstrap: add quoting support to avoid splitting

With this change, it is now possible to pass quotes to the configure script, such as

`./configure.py --set=target.\"thumbv8m.main-none-eabi\".linker=/linker`
or
`./configure.py '--set=target."thumbv8m.main-none-eabi".linker=/linker'`

, which will treat `thumbv8.main-none-eabi` as a whole part. Currently, the string would be split into two elements: `thumbv8`, and `main-none-eabi`.

The approach taken is to perform custom splitting instead of using `str.split()` and then repairing the split. Also, There are numerous corner cases not handled: the custom split doesn't differentiate between single quotes or double quotes, so it is perfectly possible to pass `./configure.py --set=target.\"thumbv8m.main-none-eabi\'.linker=/linker` and the behaviour would be the same as with all double quotes or single quotes.

As for the code, i'm unsure on whether to delimit strings with double or single quotes. I've seen both single quotes and double quotes used to delimit strings, like in
```py
err("Option '{}' provided more than once".format(key))
```
and this a handful of lines down:
```py
if option.name == 'sccache':
    set('llvm.ccache', 'sccache', config)
```
Please advise on the wanted one.

Fixes #130602

r? `@onur-ozkan`

Thanks in advance for the feedback!
2024-11-07 09:50:31 +00:00
Wilfred Hughes
cd6ddcaf42 editors/code: Change minimum VS Code from 1.78 to 1.83
It's been a year since we last bumped this (see #15904), and VS Code
1.83 is the first version that supports LSP 3.17.5 (via
vscode-languageclient 9.0.1).

https://code.visualstudio.com/updates/v1_83#_language-server-protocol
2024-11-06 15:00:59 -08:00
Enric Morales
8471c6bb0c
bootstrap: add quoting support to avoid splitting
With this change, it is now possible to pass quotes to the configure
script, such as

`./configure.py --set=target.\"thumbv8m.main-none-eabi\".linker=/linker`

, which will treat `thumbv8.main-none-eabi` as a whole part. Currently,
the string would be split into two elements: `thumbv8`, and
`main-none-eabi`.
2024-11-06 21:03:02 +01:00
bors
8549802939 Auto merge of #132703 - GuillaumeGomez:rollup-tfuef34, r=GuillaumeGomez
Rollup of 3 pull requests

Successful merges:

 - #132617 (Fix an extra newline in rendered std doc)
 - #132698 (Remove unneeded fields in `scrape_examples::FindCalls`)
 - #132700 (add note not to re-report crashes from `crashes` tests)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-06 18:53:35 +00:00
Guillaume Gomez
d150498be4
Rollup merge of #132698 - GuillaumeGomez:rm-unneeded-fields, r=notriddle
Remove unneeded fields in `scrape_examples::FindCalls`

Just a small cleanup while going through something bigger.

r? `@notriddle`
2024-11-07 02:09:52 +08:00
Guillaume Gomez
03a63fd4a4 Remove unneeded fields in scrape_examples::FindCalls 2024-11-06 17:35:14 +01:00
Michael Goulet
7d8ca6d4fc Clean middle generics using paren sugar if trait has rustc_paren_sugar 2024-11-06 15:50:50 +00:00
Vincent Esche
d5dec8ab03 Add direct_supertraits(…) HIR-level method to hir::Trait type 2024-11-06 10:02:13 +01:00
Vincent Esche
de30d7dc37 Add pub fn direct_super_traits(db, trait_id) to hir_ty crate 2024-11-06 10:02:13 +01:00
Vincent Esche
fa393dd9d8 Refactor hir::Trait's existing items_with_supertraits(…) method based on new all_supertraits(…) method 2024-11-06 10:02:13 +01:00
Vincent Esche
80df05b8b8 Add pub fn all_supertraits(…) HIR-level method to hir::Trait type 2024-11-06 10:02:13 +01:00
bors
cf2b370ad0 Auto merge of #132500 - RalfJung:char-is-whitespace-const, r=jhpratt
make char::is_whitespace unstably const

I am adding this to the existing https://github.com/rust-lang/rust/issues/132241 feature gate, since `is_digit` and `is_whitespace` seem similar enough that one can group them together.
2024-11-06 04:07:32 +00:00
bors
a69df72bdc Auto merge of #132664 - matthiaskrgr:rollup-i27nr7i, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #131261 (Stabilize `UnsafeCell::from_mut`)
 - #131405 (bootstrap/codegen_ssa: ship llvm-strip and use it for -Cstrip)
 - #132077 (Add a new `wide-arithmetic` feature for WebAssembly)
 - #132562 (Remove the `wasm32-wasi` target from rustc)
 - #132660 (Remove unused errs.rs file)

Failed merges:

 - #131721 (Add new unstable feature `const_eq_ignore_ascii_case`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-06 01:21:42 +00:00
Matthias Krüger
73035552c9
Rollup merge of #132562 - alexcrichton:remove-wasm32-wasi, r=jieyouxu
Remove the `wasm32-wasi` target from rustc

This commit is the final step in the journey of renaming the historical `wasm32-wasi` target in the Rust compiler to `wasm32-wasip1`. Various steps in this journey so far have been:

* 2023-04-03: rust-lang/compiler-team#607 - initial proposal for this rename
* 2024-11-27: rust-lang/compiler-team#695 - amended schedule/procedure for rename
* 2024-01-29: rust-lang/rust#120468 - initial introduction of `wasm32-wasip1`
* 2024-06-18: rust-lang/rust#126662 - warn on usage of `wasm32-wasi`
* 2024-11-08: this PR - remove the `wasm32-wasi` target

The full transition schedule is in [this comment][comment] and is summarized with:

* 2024-05-02: Rust 1.78 released with `wasm32-wasip1` target
* 2024-09-05: Rust 1.81 released warning on usage of `wasm32-wasi`
* 2025-01-09: Rust 1.84 to be released without the `wasm32-wasi` target

This means that support on stable for the replacement target of `wasm32-wasip1` has currently been available for 6 months. Users have already seen warnings on stable for 2 months about usage of `wasm32-wasi` and stable users have another 2 months of warnings before the target is removed from stable.

This commit is intended to be the final step in this transition so the source tree should no longer mention `wasm32-wasi` except in historical reference to the older name of the `wasm32-wasip1` target.

[comment]: https://github.com/rust-lang/rust/pull/120468#issuecomment-1977878747
2024-11-05 23:43:58 +01:00
Matthias Krüger
8dee3e978a
Rollup merge of #131405 - davidtwco:hardcoded-strip-macos, r=jieyouxu,albertlarsan68
bootstrap/codegen_ssa: ship llvm-strip and use it for -Cstrip

Fixes #131206.

- Includes `llvm-strip` (a symlink to `llvm-objcopy`) in the compiler dist artifact so that it can be used for `-Cstrip` instead of the system tooling.
- Uses `llvm-strip` instead of `/usr/bin/strip` for macOS. macOS needs a specific linker and the system one is preferred, hence #130781 but that doesn't work when cross-compiling, so use the `llvm-strip` utility instead.

cc #123151
2024-11-05 23:43:56 +01:00
Henry Jiang
904e897d07 fix missing use decl 2024-11-05 14:21:08 -05:00
Matthias Krüger
560248f4f7
Rollup merge of #132637 - blyxyas:lint-less-passes, r=flip1995
Do not filter empty lint passes & re-do CTFE pass

Some structs implement `LintPass` without having a `Lint` associated with them #125116 broke that behaviour by filtering them out. This PR ensures that lintless passes are not filtered out.
2024-11-05 20:10:53 +01:00
Matthias Krüger
b524be55db
Rollup merge of #132524 - ismailarilik:chore/style/sync-submodule-exclusion-list-between-tidy-and-rustfmt, r=jieyouxu
chore(style): sync submodule exclusion list between tidy and rustfmt

As asked in the FIXME comments
2024-11-05 20:10:50 +01:00
Matthias Krüger
0078e64439
Rollup merge of #132409 - MarcoIeni:ci-remove-linux-4c-large, r=Kobzol
CI: switch 7 linux jobs to free runners

try-job: x86_64-gnu-aux
try-job: x86_64-gnu-nopt
try-job: x86_64-gnu-tools
2024-11-05 20:10:49 +01:00
Matthias Krüger
c8247c0a19
Rollup merge of #132259 - mrkajetanp:branch-protection-pauth-lr, r=davidtwco
rustc_codegen_llvm: Add a new 'pc' option to branch-protection

Add a new 'pc' option to -Z branch-protection for aarch64 that enables the use of PC as a diversifier in PAC branch protection code.

When the pauth-lr target feature is enabled in combination with -Z branch-protection=pac-ret,pc, the new 9.5-a instructions (pacibsppc, retaasppc, etc) will be generated.
2024-11-05 20:10:49 +01:00
Henry Jiang
966f4b3b0c add run-make support for aix 2024-11-05 12:58:37 -05:00
MarcoIeni
02b34154fd
CI: switch 7 linux jobs to free runners 2024-11-05 16:56:41 +01:00
blyxyas
2eac3c0e53 Do not filter empty passes & Make CTFE Clippy into lintless pass 2024-11-05 15:27:09 +01:00
David Wood
d8ab230e73
bootstrap: include llvm-objcopy in dist 2024-11-05 11:49:03 +00:00
bors
096277e989 Auto merge of #132580 - compiler-errors:globs, r=Noratrieb
Remove unnecessary pub enum glob-imports from `rustc_middle::ty`

We used to have an idiom in the compiler where we'd prefix or suffix all the variants of an enum, for example `BoundRegionKind`, with something like `Br`, and then *glob-import* that enum variant directly.

`@noratrieb` brought this up, and I think that it's easier to read when we just use the normal style `EnumName::Variant`.

This PR is a bit large, but it's just naming.

The only somewhat opinionated change that this PR does is rename `BorrowKind::Imm` to `BorrowKind::Immutable` and same for the other variants. I think these enums are used sparingly enough that the extra length is fine.

r? `@noratrieb` or reassign
2024-11-05 08:30:56 +00:00
bors
27e38f8fc7 Auto merge of #132626 - workingjubilee:rollup-hbmtbzk, r=workingjubilee
Rollup of 11 pull requests

Successful merges:

 - #131153 (Improve duplicate derive Copy/Clone diagnostics)
 - #132025 (fix suggestion for diagnostic error E0027)
 - #132303 (More tests for non-exhaustive C-like enums in FFI)
 - #132492 (remove support for extern-block const intrinsics)
 - #132587 (Revert "Avoid nested replacement ranges" from #129346.)
 - #132596 ([rustdoc] Fix `--show-coverage` when JSON output format is used)
 - #132598 (Clippy: Move some attribute lints to be early pass (post expansion))
 - #132601 (Update books)
 - #132606 (Improve example of `impl Pattern for &[char]`)
 - #132608 (document `type_implements_trait`)
 - #132609 (docs: fix grammar in doc comment at unix/process.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-11-05 05:53:19 +00:00
Jubilee
3d4dd742bb
Rollup merge of #132601 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/edition-guide

3 commits in 1f07c242f8162a711a5ac5a4ea8fa7ec884ee7a9..2d482e203eb6d6e353814cf1415c5f94e590b9e0
2024-11-04 14:42:36 UTC to 2019-06-14 21:27:05 UTC

- 2024: rustfmt style edition (rust-lang/edition-guide#331)
- rustdoc: Fix doctest `include` paths (rust-lang/edition-guide#329)
- docs(cargo): Cover MSRV-aware resolver (rust-lang/edition-guide#328)

## rust-lang/reference

3 commits in 23ce619966541bf2c80d45fdfeecf3393e360a13..da0f6dad767670da0e8cd5af8a7090db3272f626
2024-11-01 12:52:51 UTC to 2024-10-30 13:30:17 UTC

- fix typo referring to 'Unsize' trait (rust-lang/reference#1669)
- Add identifier syntax to items.md and subchapters (rust-lang/reference#1599)
- Rename "object safe" to "dyn compatible" (rust-lang/reference#1666)

## rust-lang/rust-by-example

5 commits in 8bede1b919a81ab7d0c961f6bbf68d3efa297bd2..9db78608b17d5f4a6c033b8a3038466b87d63206
2024-10-31 21:03:20 UTC to 2024-10-26 16:06:05 UTC

- fix(doc): correct small errors in pipes.md (rust-lang/rust-by-example#1894)
- Fix ambiguous comment on 2.3 Arrays and Slices page (rust-lang/rust-by-example#1885)
- Fix typo in generics/new_types (rust-lang/rust-by-example#1892)
- docs(zh): fix known issues (rust-lang/rust-by-example#1891)
- `read_lines`: Use `.map_while(Result::ok)` instead of `.flatten()`. (rust-lang/rust-by-example#1890)

## rust-lang/rustc-dev-guide

22 commits in 59d94ea75a0b157e148af14c73c2dd60efb7b60a..6a5accdaf10255882b1e6c59dfe5f1c79ac95484
2024-11-04 14:40:57 UTC to 2024-10-24 20:33:08 UTC

- Add a link for the `reference` compiletest header (rust-lang/rustc-dev-guide#2096)
- Slightly fix up the glossary (rust-lang/rustc-dev-guide#2127)
- Remove an mdbook workaround (rust-lang/rustc-dev-guide#2124)
- Fix broken links (rust-lang/rustc-dev-guide#2123)
- Fix minicore.rs link (rust-lang/rustc-dev-guide#2122)
- Update for recent dataflow simplifications. (rust-lang/rustc-dev-guide#2121)
- Describe `minicore` test auxiliary and directive (rust-lang/rustc-dev-guide#2097)
- Fix and update docs for `needs-force-clang-based-tests` (rust-lang/rustc-dev-guide#2085)
- Add redirects for integration-testing and headers (rust-lang/rustc-dev-guide#2092)
- Fix borked links (rust-lang/rustc-dev-guide#2119)
- Describe how to revert a PR (rust-lang/rustc-dev-guide#2118)
- Linkify the footnotes in the async closure chapter (rust-lang/rustc-dev-guide#2117)
- Try to fix footnotes (rust-lang/rustc-dev-guide#2115)
- Fix rustc-related links that are 404 right now (rust-lang/rustc-dev-guide#2112)
- Async closures chapter (rust-lang/rustc-dev-guide#2110)
- update rfl ci job policy (rust-lang/rustc-dev-guide#2108)
- Fix internal and incomplete links (rust-lang/rustc-dev-guide#2107)
- Describe why and how to use a separate build directory for rust-analyzer (rust-lang/rustc-dev-guide#2106)
- Update current status of diagnostics translation infra (rust-lang/rustc-dev-guide#2105)
- update const stability docs (rust-lang/rustc-dev-guide#2098)
- Advice on auto-formatting C++ code (rust-lang/rustc-dev-guide#2104)
- Update compiler-src.md (rust-lang/rustc-dev-guide#2102)
2024-11-04 20:40:48 -08:00
Jubilee
d70e2e30da
Rollup merge of #132598 - jdonszelmann:move-lints-to-early, r=xFrednet
Clippy: Move some attribute lints to be early pass (post expansion)

r? ```@xFrednet```

As a side effect it removes a duplicated warning on line 53 of the `allow_attributes` test. I discussed this with ```@xFrednet``` , and it's mainly to support the attribute rework https://github.com/rust-lang/rust/issues/131229
2024-11-04 20:40:48 -08:00
Jubilee
b3fc9e6d6f
Rollup merge of #132596 - GuillaumeGomez:show-coverage, r=notriddle
[rustdoc] Fix `--show-coverage` when JSON output format is used

I realized while looking on the docs.rs page of the `sysinfo` crate that the coverage numbers displayed were wrong:

![image](https://github.com/user-attachments/assets/264b2e25-6271-4ed1-8b35-e8bd4fd475c6)

I realized that it was because `--show-coverage --output-format=json` was relying on the same logic as the JSON output for the doc generation whereas it should not. I fixed it by changing the API for querying `is_json` a bit.

The underlying issue is that JSON output format is stripping reexports of items from private modules.

r? ``@notriddle``
2024-11-04 20:40:47 -08:00
bors
96477c55bc Auto merge of #131341 - taiki-e:ppc-clobber-abi, r=bzEq,workingjubilee
Support clobber_abi and vector registers (clobber-only) in PowerPC inline assembly

This supports `clobber_abi` which is one of the requirements of stabilization mentioned in #93335.

This basically does a similar thing I did in https://github.com/rust-lang/rust/pull/130630 to implement `clobber_abi` for s390x, but for powerpc/powerpc64/powerpc64le.
- This also supports vector registers (as `vreg`) as clobber-only, which need to support clobbering of them to implement `clobber_abi`.
- `vreg` should be able to accept `#[repr(simd)]` types as input/output if the unstable `altivec` target feature is enabled, but `core::arch::{powerpc,powerpc64}` vector types, `#[repr(simd)]`, and `core::simd` are all unstable, so the fact that this is currently a clobber-only should not be considered a blocker of clobber_abi implementation or stabilization. So I have not implemented it in this PR.
  - See https://github.com/rust-lang/rust/pull/131551 (which is based on this PR) for a PR to implement this.
  - (I'm not sticking to whether that PR should be a separate PR or part of this PR, so I can merge that PR into this PR if needed.)

Refs:
- PPC32 SysV: Section "Function Calling Sequence" in [System V Application Binary Interface PowerPC Processor Supplement](https://refspecs.linuxfoundation.org/elf/elfspec_ppc.pdf)
- PPC64 ELFv1: Section 3.2 "Function Calling Sequence" in [64-bit PowerPC ELF Application Binary Interface Supplement](https://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#FUNC-CALL)
- PPC64 ELFv2: Section 2.2 "Function Calling Sequence" in [64-Bit ELF V2 ABI Specification](https://openpowerfoundation.org/specifications/64bitelfabi/)
- AIX: [Register usage and conventions](https://www.ibm.com/docs/en/aix/7.3?topic=overview-register-usage-conventions), [Special registers in the PowerPC®](https://www.ibm.com/docs/en/aix/7.3?topic=overview-special-registers-in-powerpc), [AIX vector programming](https://www.ibm.com/docs/en/aix/7.3?topic=concepts-aix-vector-programming)
- Register definition in LLVM: https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/PowerPC/PPCRegisterInfo.td#L189

If I understand the above four ABI documentations correctly, except for the PPC32 SysV's VR (Vector Registers) and 32-bit AIX (currently not supported by rustc)'s r13, there does not appear to be important differences in terms of implementing `clobber_abi`:
- The above four ABIs are consistent about FPR (0-13: volatile, 14-31: nonvolatile), CR (0-1,5-7: volatile, 2-4: nonvolatile), XER (volatile), and CTR (volatile).
- As for GPR, only the registers we are treating as reserved are slightly different
  - r0, r3-r12 are volatile
  - r1(sp, reserved), r14-31 are nonvolatile
  - r2(reserved) is TOC pointer in PPC64 ELF/AIX, system-reserved register in PPC32 SysV (AFAIK used as thread pointer in Linux/BSDs)
  - r13(reserved for non-32-bit-AIX) is thread pointer in PPC64 ELF, small data area pointer register in PPC32 SysV, "reserved under 64-bit environment; not restored across system calls[^r13]" in AIX)
- As for FPSCR, volatile in PPC64 ELFv1/AIX, some fields are volatile only in certain situations (rest are volatile) in PPC32 SysV/PPC64 ELFv2.
- As for VR (Vector Registers), it is not mentioned in PPC32 SysV, v0-v19 are volatile in both in PPC64 ELF/AIX, v20-v31 are nonvolatile in PPC64 ELF, reserved or nonvolatile depending on the ABI ([vec-extabi vs vec-default in LLVM](https://reviews.llvm.org/D89684), we are [using vec-extabi](https://github.com/rust-lang/rust/pull/131341#discussion_r1797693299)) in AIX:
  > When the default Vector enabled mode is used, these registers are reserved and must not be used.
  > In the extended ABI vector enabled mode, these registers are nonvolatile and their values are preserved across function calls

  I left [FIXME comment about PPC32 SysV](https://github.com/rust-lang/rust/pull/131341#discussion_r1790496095) and added ABI check for AIX.
- As for VRSAVE, it is not mentioned in PPC32 SysV, nonvolatile in PPC64 ELFv1, reserved in PPC64 ELFv2/AIX
- As for VSCR, it is not mentioned in PPC32 SysV/PPC64 ELFv1, some fields are volatile only in certain situations (rest are volatile) in PPC64 ELFv2, volatile in AIX

We are currently treating r1-r2, r13 (non-32-bit-AIX), r29-r31, LR, CTR, and VRSAVE as reserved.
We are currently not processing anything about FPSCR and VSCR, but I feel those are things that should be processed by `preserves_flags` rather than `clobber_abi` if we need to do something about them. (However, PPCRegisterInfo.td in LLVM does not seem to define anything about them.)

Replaces #111335 and #124279

cc `@ecnelises` `@bzEq` `@lu-zero`

r? `@Amanieu`

`@rustbot` label +O-PowerPC +A-inline-assembly

[^r13]: callee-saved, according to [LLVM](6a6af0246b/llvm/lib/Target/PowerPC/PPCCallingConv.td (L322)) and [GCC](a9173a50e7/gcc/config/rs6000/rs6000.h (L859)).
2024-11-05 03:13:47 +00:00
Jonathan Dönszelmann
f4b72dcff0
Move two attribute lints to be early pass (post expansion) 2024-11-04 22:47:22 +01:00
bors
fbab78289d Auto merge of #132594 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2024-11-04 20:20:16 +00:00
Laurențiu Nicola
59ee3bd948 Enable triagebot transfer feature 2024-11-04 21:35:10 +02:00
rustbot
75c943ed2d Update books 2024-11-04 09:29:10 -08:00
Matthias Krüger
46ae1555e2
Rollup merge of #132579 - RalfJung:rustc-std-workspace-crates, r=Amanieu
add rustc std workspace crate sources

This adds the sources for the crates listed at https://crates.io/search?q=rustc-std-workspace in this repo. The first commit adds the original sources as downloaded from crates.io (with `Cargo.toml.orig` moved back over `Cargo.toml`), and adds a README explaining what this is about. The 2nd commit updates the sources to make the core and alloc crates re-exports of the "actual" core and alloc crates, as was already the case with `std`, and also adds a `repository` link to the manifest so one can figure out where to find these crates.

I bumped the version for the core and alloc crates in the hope that the new versions can be published on crates.io shortly after this PR lands.

See [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/219381-t-libs/topic/rustc-std-workspace-core.20crate.20is.20empty) for a bit more context.

r? `@Amanieu`
2024-11-04 18:12:47 +01:00
Guillaume Gomez
5dfbc0383d Rename DocContext::is_json into DocContext::is_json_output 2024-11-04 17:29:57 +01:00
Guillaume Gomez
e9161db5b5 Fix invalid coverage computation when --output-format=json is enabled 2024-11-04 14:28:35 +01:00
Laurențiu Nicola
1330cd1888 Don't try to auto-publish text-edit 2024-11-04 15:23:05 +02:00
Lukas Wirth
acfacff642
Merge pull request #18475 from Veykril/push-zkvkpxttozup
Support new #[rustc_intrinsic] attribute and fallback bodies
2024-11-04 12:48:00 +00:00
Lukas Wirth
5cbfb7422b Support new #[rustc_intrinsic] attribute and fallback bodies 2024-11-04 13:33:55 +01:00
Lukas Wirth
aa59ac3ada
Merge pull request #18473 from Veykril/push-xnlzukoqttvz
Render extern blocks in `file_structure`
2024-11-04 11:34:35 +00:00
Lukas Wirth
8071cbd730 Render extern blocks in file_structure 2024-11-04 12:21:05 +01:00
Laurențiu Nicola
9f4e71940f Fix feature name casing 2024-11-04 10:27:32 +02:00
Ralf Jung
b2fe71a2fe miri: update ABI compat checks to accept Option-like types 2024-11-04 07:50:40 +01:00
Ralf Jung
b12745863e update rustc-std-workspace crates
- make rustc-std-workspace-core/alloc re-exports of their underlying crates, like std
= cleanup manifests
2024-11-04 07:45:15 +01:00
Michael Goulet
d458f850aa ty::BrK -> ty::BoundRegionKind::K 2024-11-04 04:45:52 +00:00
Michael Goulet
883f8705d4 Remove BorrowKind glob, make names longer 2024-11-04 04:45:52 +00:00
Michael Goulet
be4b0261c2 ty::KContainer -> ty::AssocItemContainer::K 2024-11-04 04:45:52 +00:00
Jubilee
cf712a2485
Rollup merge of #132560 - Urgau:tidy-license-deps, r=onur-ozkan
Remove outdated tidy license fixmes

~~This PR re-enables license dependency checking for:~~
 - ~~the `backtrace` submodule~~
 - ~~and the `portable-simd` subtree~~

~~The `stdarch` submodule doesn't have a `Cargo.lock` yet so we can't re-enable it.~~

This PR removes outdated tidy license fixmes, https://github.com/rust-lang/rust/pull/132560#issuecomment-2453525276.

r? bootstrap
2024-11-03 15:24:59 -08:00
Jubilee
deb4ceb263
Rollup merge of #126136 - Noratrieb:bootstrap-naming, r=onur-ozkan
Call the target libdir target libdir

Because it's the target libdir.

`--print` uses the same terminology, and it's a simple way to make it obviously different from `$sysroot/lib`.
2024-11-03 15:24:57 -08:00
Ralf Jung
5c6f27b1e0 extract rustc-std-workspace crate sources from crates.io and place them here 2024-11-03 22:30:02 +01:00
Urgau
b3fc11bd64 Remove outdated tidy license fixmes 2024-11-03 20:41:06 +01:00
Michael Goulet
6b96103bf3 Rename the FIXMEs, remove a few that dont matter anymore 2024-11-03 18:59:41 +00:00
Alex Crichton
c049cc17f3 Remove the wasm32-wasi target from rustc
This commit is the final step in the journey of renaming the historical
`wasm32-wasi` target in the Rust compiler to `wasm32-wasip1`. Various
steps in this journey so far have been:

* 2023-04-03: rust-lang/compiler-team#607 - initial proposal for this rename
* 2024-11-27: rust-lang/compiler-team#695 - amended schedule/procedure for rename
* 2024-01-29: rust-lang/rust#120468 - initial introduction of `wasm32-wasip1`
* 2024-06-18: rust-lang/rust#126662 - warn on usage of `wasm32-wasi`
* 2024-11-08: this PR - remove the `wasm32-wasi` target

The full transition schedule is in [this comment][comment] and is
summarized with:

* 2024-05-02: Rust 1.78 released with `wasm32-wasip1` target
* 2024-09-05: Rust 1.81 released warning on usage of `wasm32-wasi`
* 2025-01-09: Rust 1.84 to be released without the `wasm32-wasi` target

This means that support on stable for the replacement target of
`wasm32-wasip1` has currently been available for 6 months. Users have
already seen warnings on stable for 2 months about usage of
`wasm32-wasi` and stable users have another 2 months of warnings before
the target is removed from stable.

This commit is intended to be the final step in this transition so the
source tree should no longer mention `wasm32-wasi` except in historical
reference to the older name of the `wasm32-wasip1` target.

[comment]: https://github.com/rust-lang/rust/pull/120468#issuecomment-1977878747
2024-11-03 07:09:34 -08:00
Lukas Wirth
56e89bc5a4 Allow interpreting consts and statics with interpret function command 2024-11-03 15:35:45 +01:00
Lukas Wirth
72d9929ccd
Merge pull request #18469 from Veykril/push-zwnywqmvtuts
feat: Show `static` values on hover
2024-11-03 13:00:32 +00:00
Matthias Krüger
13cdfae599
Rollup merge of #132540 - compiler-errors:gc, r=calebcartwright
Do not format generic consts

We introduced **nightly support** for generic const items in #113522, but formatting of consts was not modified. Making them format *correctly* is hard, so let's just bail formatting them so we don't accidentally strip their generics and where clauses. This is essentially no-op formatting for generic const items.

r? `````@calebcartwright````` or `````@ytmimi`````
2024-11-03 12:08:55 +01:00
Matthias Krüger
b438a5cd2a
Rollup merge of #132499 - RalfJung:unicode_data.rs, r=tgross35
unicode_data.rs: show command for generating file

https://github.com/rust-lang/rust/pull/131647 made this an easily runnable tool, now we just have to mention that in the comment. :)

Fixes https://github.com/rust-lang/rust/issues/131640.
2024-11-03 12:08:51 +01:00
Nilstrieb
f42fb43517 Call the target libdir target libdir
Because it's the target libdir.

`--print` uses the same terminology, and it's a simple way to make it
obviously different from `$sysroot/lib`.
2024-11-03 11:49:43 +01:00
The Miri Cronjob Bot
b58cbe2361 Merge from rustc 2024-11-03 05:18:08 +00:00
The Miri Cronjob Bot
9c75effc6c Preparing for merge from rustc 2024-11-03 05:09:57 +00:00