1
Fork 0
Commit graph

277097 commits

Author SHA1 Message Date
Jubilee Young
66bf53ac33 Bump backtrace to 0.3.75
I prefer when we can ship the same version of backtrace on crates.io,
and this will be the next published version.

Compare: https://github.com/rust-lang/backtrace-rs/compare/4d7906b...0.3.75

Mostly internal-to-backtrace changes, plus a tiny code size win.
2025-01-03 20:16:52 -08:00
bors
8d2c06d151 Auto merge of #135086 - matthiaskrgr:rollup-3sfnc1w, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #133420 (Switch rtems target to panic unwind)
 - #134965 (Make Boxy UwU)
 - #135007 (Some type-outlives computation tweaks)
 - #135036 (run-make-support: adjust assertion printing, add some basic sanity checks)
 - #135043 (rustdoc: treat `allowed_through_unstable_modules` as deprecation)
 - #135044 (Improve infer (`_`) suggestions in `const`s and `static`s)
 - #135058 (refactor bootstrap path resolution)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-03 22:42:57 +00:00
Matthias Krüger
c02499feb1
Rollup merge of #135058 - onur-ozkan:path-resolution, r=jieyouxu
refactor bootstrap path resolution

Previously we removed paths as soon as we found the first intersection, which made it impossible to find other intersecting paths (and that is the reason of https://github.com/rust-lang/rust/issues/135022).

This patch changes that by marking the intersecting paths instead, so we can collect them all and remove them together when needed. Which means, `x build compiler` would compile anything that ends or starts with `"compiler"` instead of picking the first matching `Step` from `builder::get_step_descriptions`.

Fixes https://github.com/rust-lang/rust/issues/135022
2025-01-03 22:12:45 +01:00
Matthias Krüger
12cc9b4b6f
Rollup merge of #135044 - compiler-errors:better-infer-suggestions-in-const, r=oli-obk
Improve infer (`_`) suggestions in `const`s and `static`s

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

This PR does a few things to (imo) greatly improve the error message when users write something like `static FOO: [i32; _] = [1, 2, 3]`.

Firstly, it adapts the recovery code for when we encounter `_` in a const/static to work a bit more like `fn foo() -> _`, and removes the somewhat redundant query `diagnostic_only_typeck`.

Secondly, it changes the lowering for `[T; _]` to always lower under the `feature(generic_arg_infer)` logic to `ConstArgKind::Infer`. We still issue the feature error, so it's not doing anything *observable* on the good path, but it does mean that we no longer erroneously interpret `[T; _]`'s array length as a `_` **wildcard expression** (à la destructuring assignment, like `(_, y) = expr`).

Lastly it makes the suggestions verbose and fixes (well, suppresses) a bug with stashing and suggestions.

r? oli-obk
2025-01-03 22:12:45 +01:00
Matthias Krüger
f0c03f640a
Rollup merge of #135043 - notriddle:notriddle/allowed-through-unstable-modules-is-a-deprecation-flag, r=GuillaumeGomez
rustdoc: treat `allowed_through_unstable_modules` as deprecation

This ensures `std::intrinsics::transmute` is deemphasized in the search engine and other UI, by cleaning it into a deprecation without propagating it through reexports when the parent module is stable.

Fixes #131676

Related to #135003

r? ``@GuillaumeGomez``

``@RalfJung`` ``@workingjubilee``
2025-01-03 22:12:44 +01:00
Matthias Krüger
564a29dbfb
Rollup merge of #135036 - jieyouxu:rmake-be-quiet, r=compiler-errors
run-make-support: adjust assertion printing, add some basic sanity checks

cc ``@Noratrieb``

I think we may have unintentionally regressed this recently and double-printed (or printed even when the assertions didn't fail). This PR should condition the detail dumps only when the assertions fail.

Added some basic sanity checks for the assertions helpers except for the directory comparisons. That particular helper is not robust against symlinks, and I intend to address it in a follow-up (issue is #135037).

r? bootstrap (or compiler)
2025-01-03 22:12:43 +01:00
Matthias Krüger
cdfe3d7f4a
Rollup merge of #135007 - compiler-errors:outlives-tweaks, r=oli-obk
Some type-outlives computation tweaks

Some tweaks that I wrote when investigating https://github.com/rust-lang/rust/issues/135006.

The only commit that's probably interesting here is f3646748cd (the first commit). For some reason it was concerned with filtering out param-env outlives clauses when they matched item-bound outlives clauses. However, if you look at the rest of the control flow for that function, not filtering out those bounds doesn't actually affect the behavior materially.
2025-01-03 22:12:43 +01:00
Matthias Krüger
d1c7ad081f
Rollup merge of #134965 - Noratrieb:slightly-late-for-boxing-day-sadly-but-still-almost, r=BoxyUwU
Make Boxy UwU

as requested by

r? ``@BoxyUwU``

, supersedes #129906

We need 2 entries here, the first one tells us that this email and this name is canonical for you, the second entry maps that email to your canonical email (and name).
2025-01-03 22:12:42 +01:00
Matthias Krüger
4cd289550f
Rollup merge of #133420 - thesummer:rtems-unwind, r=workingjubilee
Switch rtems target to panic unwind

Switch the RTEMS target to `panic_unwind`.

Relates to https://github.com/rust-lang/backtrace-rs/pull/682
2025-01-03 22:12:41 +01:00
bors
3f43b1a636 Auto merge of #135034 - Noratrieb:strip-correctly, r=jieyouxu
Pass objcopy args for stripping on OSX

When `-Cstrip` was changed in #131405 to use the bundled rust-objcopy instead of /usr/bin/strip on OSX, strip-like arguments were preserved.

But strip and objcopy are, while being the same binary, different, they have different defaults depending on which binary they are. Notably, strip strips everything by default, and objcopy doesn't strip anything by default.

Additionally, `-S` actually means `--strip-all`, so debuginfo stripped everything and symbols didn't strip anything.

We now correctly pass `--strip-debug` and `--strip-all`.

fixes #135028

try-job: aarch64-apple
try-job: dist-aarch64-apple
2025-01-03 17:20:39 +00:00
bors
6c8347b958 Auto merge of #135063 - pietroalbini:pa-bump-version, r=pietroalbini
Bump version to 1.86.0

Part of the release process.

r? `@ghost`
2025-01-03 14:14:58 +00:00
许杰友 Jieyou Xu (Joe)
6175d73862 run-make-support: tidy up assertion failure dumping
Avoid double-dumping or dumping even when assertion is successful.
2025-01-03 20:06:46 +08:00
许杰友 Jieyou Xu (Joe)
7b763031e1 run-make-support: add basic sanity tests for assertion helpers 2025-01-03 19:57:30 +08:00
许杰友 Jieyou Xu (Joe)
f7d0842198 run-make-support: convert assertion_helpers to module 2025-01-03 19:56:30 +08:00
Pietro Albini
22002dbf04
bump version 2025-01-03 10:36:06 +01:00
bors
319f5292a1 Auto merge of #135059 - matthiaskrgr:rollup-0ka9o3h, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #131729 (Make the `test` cfg a userspace check-cfg)
 - #134241 (more concrete source url of std docs [V2])
 - #135042 (taint fcx on selection errors during unsizing)
 - #135049 (Remove unused fields from RepeatElementCopy obligation)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-03 09:34:23 +00:00
onur-ozkan
baa7fcec85 add coverage for multiple paths
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-03 10:01:22 +03:00
Matthias Krüger
0053aa4e9d
Rollup merge of #135049 - cramertj:rmunused, r=compiler-errors
Remove unused fields from RepeatElementCopy obligation
2025-01-03 07:57:27 +01:00
Matthias Krüger
e0f4dc955a
Rollup merge of #135042 - lukas-code:taint-dyn-incompat, r=compiler-errors
taint fcx on selection errors during unsizing

With `feature(dyn_compatible_for_dispatch)` we only check for dyn-compatibility by checking the `T: Unsize<dyn Trait>` predicate during the unsizing coercions checks. If the predicate doesn't hold, we emit an error, but pretend the coercion succeeded to prevent further errors. To prevent const eval from attempting to actually perform this coercion, we need to taint the fcx after reporting the trait errors in the coercion check.

fixes https://github.com/rust-lang/rust/issues/135021
fixes https://github.com/rust-lang/rust/issues/130521
2025-01-03 07:57:26 +01:00
Matthias Krüger
e11d5f88a2
Rollup merge of #134241 - liigo:patch-16, r=dtolnay
more concrete source url of std docs [V2]

r? jhpratt
since you have reivewed https://github.com/rust-lang/rust/pull/134193

> If someone is looking to contribute, they will want the repository as a whole, not the lib.rs for std.

Now the repository url is reserved, I just add another concrete url as an example, to help people finding target page more quickly&easily.
2025-01-03 07:57:25 +01:00
Matthias Krüger
8439ae7422
Rollup merge of #131729 - Urgau:check-cfg-test-userspace, r=petrochenkov
Make the `test` cfg a userspace check-cfg

This PR implements MCP https://github.com/rust-lang/compiler-team/issues/785, which makes the `test` cfg a "userspace" check-cfg, i.e. no longer included in the well known cfg list.

Things to do:

- [x] Accept the MCP (https://github.com/rust-lang/compiler-team/issues/785#issuecomment-2424121886)
- [x] Mark `test` in Cargo (https://github.com/rust-lang/cargo/pull/14963)

`@rustbot` labels +S-waiting-on-MCP +F-check_cfg
r? `@petrochenkov`
2025-01-03 07:57:24 +01:00
onur-ozkan
3807440a00 avoid early return to handle all paths
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-03 09:54:36 +03:00
bors
ac00fe89a1 Auto merge of #134692 - GrigorenkoPV:sync_poision, r=tgross35
Move some things to `std::sync::poison` and reexport them in `std::sync`

Tracking issue: #134646

r? `@tgross35`

I've used `sync_poison_mod` feature flag instead, because `sync_poison` had already been used back in 1.2.

try-job: x86_64-msvc
2025-01-03 06:40:28 +00:00
onur-ozkan
be2f75f3b7 Revert "bootstrap: temporarily flip compile::Rustc vs compile::Assemble"
This reverts commit 552c1f5f45.
2025-01-03 08:57:58 +03:00
onur-ozkan
c367c62b27 revert step order from #134919
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-03 08:57:19 +03:00
onur-ozkan
00cd943709 adapt bootstrap tests to the new path resolution logic
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-03 08:57:16 +03:00
onur-ozkan
a8516c052e refactor bootstrap path resolution
Previously we removed paths as soon as we found the first intersection, which made
it impossible to find other intersecting paths. This patch changes that by marking
the intersecting paths instead, so we can collect them all and remove them together
when needed.

Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-03 08:57:13 +03:00
bors
870c13dc9b Auto merge of #135053 - workingjubilee:backtrace-without-ruzstd, r=workingjubilee
Bump backtrace to rust-lang/backtrace-rs@4d7906b

Compare: 230570f...4d7906b

Mostly cleanups and enabling backtraces for the RTEMS target.

r? `@ghost`
2025-01-03 03:56:07 +00:00
Jubilee Young
6f5fd6d26a Bump backtrace to rust-lang/backtrace-rs@4d7906b
Compare: 230570f...4d7906b

Mostly cleanups and enabling backtraces for the RTEMS target.
2025-01-02 17:10:55 -08:00
Michael Goulet
0fd64efa2f Fix macro shenanigans 2025-01-02 23:39:17 +00:00
Michael Goulet
7601adb4a0 Make suggestion verbose and tweak error message 2025-01-02 23:39:17 +00:00
Michael Goulet
8e344ae127 Suppress type param suggestion if encountering invalid const infer 2025-01-02 23:39:16 +00:00
Michael Goulet
6885ff4a7b Unconditionally lower generic_arg_infer 2025-01-02 23:39:16 +00:00
Michael Goulet
b85a91fc59 More refined spans for placeholder error in const/static 2025-01-02 23:39:16 +00:00
Michael Goulet
c529fe0475 Remove diagnostic_only_typeck and fix placeholder suggestion for const/static 2025-01-02 23:39:16 +00:00
Michael Goulet
c5d4996404 nit: Make get_infer_ret_ty name more consistent with is_suggestable_infer_ty 2025-01-02 23:39:16 +00:00
Taylor Cramer
9281be94b5 Remove unused fields from RepeatElementCopy obligation 2025-01-02 14:46:36 -08:00
bors
ab3924b298 Auto merge of #122565 - Zoxc:atomic-panic-msg, r=the8472
Try to write the panic message with a single `write_all` call

This writes the panic message to a buffer before writing to stderr. This allows it to be printed with a single `write_all` call, preventing it from being interleaved with other outputs. It also adds newlines before and after the message ensuring that only the panic message will have its own lines.

Before:
```
thread 'thread 'thread 'thread 'thread '<unnamed>thread 'thread 'thread 'thread '<unnamed><unnamed>thread '<unnamed>' panicked at ' panicked at <unnamed><unnamed><unnamed><unnamed><unnamed>' panicked at <unnamed>' panicked at src\heap.rssrc\heap.rs'
panicked at ' panicked at ' panicked at ' panicked at ' panicked at src\heap.rs' panicked at src\heap.rs::src\heap.rssrc\heap.rssrc\heap.rssrc\heap.rssrc\heap.rs:src\heap.rs:455455:::::455:455::455455455455455:455:99:::::9:9:
:
999:
999:
assertion failed: size <= (*queue).block_size:
:
assertion failed: size <= (*queue).block_size:
assertion failed: size <= (*queue).block_size:
:
:
assertion failed: size <= (*queue).block_sizeassertion failed: size <= (*queue).block_sizeassertion failed: size <= (*queue).block_size

assertion failed: size <= (*queue).block_size
assertion failed: size <= (*queue).block_sizeassertion failed: size <= (*queue).block_sizeerror: process didn't exit successfully: `target\debug\direct_test.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)
```
After:
```

thread '<unnamed>' panicked at src\heap.rs:455:9:
assertion failed: size <= (*queue).block_size

thread '<unnamed>' panicked at src\heap.rs:455:9:
assertion failed: size <= (*queue).block_size

thread '<unnamed>' panicked at src\heap.rs:455:9:
assertion failed: size <= (*queue).block_size

error: process didn't exit successfully: `target\debug\direct_test.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)
```

---

try-jobs: x86_64-gnu-llvm-18
2025-01-02 22:06:09 +00:00
Noratrieb
4da3aedb5e Pass objcopy args for stripping on OSX
When `-Cstrip` was changed to use the bundled rust-objcopy instead of
/usr/bin/strip on OSX, strip-like arguments were preserved.

But strip and objcopy are, while being the same binary, different, they
have different defaults depending on which binary they are.
Notably, strip strips everything by default, and objcopy doesn't strip
anything by default.

Additionally, `-S` actually means `--strip-all`, so debuginfo stripped
everything and symbols didn't strip anything.

We now correctly pass `--strip-debug` and `--strip-all`.
2025-01-02 22:17:39 +01:00
Michael Howell
8af769d1b1
Use is_some_and helper
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
2025-01-02 14:08:43 -07:00
Michael Howell
c7cb8224e2 rustdoc: treat allowed_through_unstable_modules as deprecation
This ensures `std::intrinsics::transmute` is deemphasized
in the search engine and other UI, by cleaning it into a deprecation
without propagating it through reexports when the parent module
is stable.
2025-01-02 12:03:24 -07:00
bors
4363f9b6f6 Auto merge of #135040 - matthiaskrgr:rollup-34vsa8n, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #135016 (Ping me for rustc-dev-guide subtree changes on this repo)
 - #135027 (Remove range-metadata amdgpu workaround)
 - #135029 (Update mailmap)
 - #135033 (try to dedup me in the mailmap)
 - #135035 (Fix formatting command)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-02 19:02:41 +00:00
Lukas Markeffsky
93bb639ad6 taint fcx on selection errors during unsizing 2025-01-02 19:16:00 +01:00
Matthias Krüger
666794e5c7
Rollup merge of #135035 - Noratrieb:fixfmt, r=jieyouxu
Fix formatting command

The formatting command previously had two issues:
- if rustfmt failed, it would print the command invocation. this is unnecessarily noisy
- there was a race condition that lead to orphan rustfmts that would print their output after bootstrap exited

We fix this by
- removing the printing, it's not really useful
- threading failure through properly instead of just yoloing exit(1)
2025-01-02 18:27:22 +01:00
Matthias Krüger
ea662fc8cb
Rollup merge of #135033 - Eh2406:Eh2406-mailmap, r=jieyouxu
try to dedup me in the mailmap

I have a few more aliases than appeared in the mail map. Perhaps that is why I have been duplicated.
2025-01-02 18:27:21 +01:00
Matthias Krüger
7ec49fda6d
Rollup merge of #135029 - weihanglo:mailmap, r=jieyouxu
Update mailmap

Saw this Zulip thread: https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/Changes.20to.20thanks.2Erust-lang.2Eorg

and decided to add myself to mailmap
2025-01-02 18:27:21 +01:00
Matthias Krüger
e0cc6f15a2
Rollup merge of #135027 - Flakebi:remove-range-workaround, r=compiler-errors
Remove range-metadata amdgpu workaround

Range metadata was disabled for amdgpu due to a backend bug. I did not encounter any problems when removing the workaround to enable range metadata (tried compiling `core` and `alloc`), so I assume this has been fixed in LLVM in the last years.

Remove the workaround to re-enable range metadata.

Tracking issue: #135024
2025-01-02 18:27:20 +01:00
Matthias Krüger
c3ffc2d049
Rollup merge of #135016 - jieyouxu:dev-guide-ping-list, r=Kobzol
Ping me for rustc-dev-guide subtree changes on this repo

r? `@Kobzol`
2025-01-02 18:27:20 +01:00
Noratrieb
8b73fc5e27 Fix formatting command
The formatting command previously had two issues:
- if rustfmt failed, it would print the command invocation. this is
  unnecessarily noisy
- there was a race condition that lead to orphan rustfmts that would
  print their output after bootstrap exited

We fix this by
- removing the printing, it's not really useful
- threading failure through properly instead of just yoloing exit(1)
2025-01-02 17:26:46 +01:00
bors
1b2745d72a Auto merge of #135014 - Zalathar:tool-build-step, r=jieyouxu
bootstrap: Overhaul and simplify the `tool_extended!` macro

Similar to #134950, but for the macro that declares build steps for some tools.

The main changes are:
- Removing some functionality that isn't needed by any of the tools currently using the macro
- Moving some code out of the macro and into ordinary helper functions
- Switching to one macro invocation per tool, and struct-like syntax so that rustfmt will format them

There should be no functional change.
2025-01-02 16:18:28 +00:00