Commit Graph

264592 Commits

Author SHA1 Message Date
Matthias Krüger a8a242c0ec
Rollup merge of #129526 - compiler-errors:fx, r=lqd
Use `FxHasher` on new solver unconditionally

r? lqd

This should actually fix the inference problem in ad855fe6db, since `HashSet::default` was not inferring the hasher when `HashSet` was coming from the stdlib due to the way that defaulted types/inference vars work. You could cherry-pick this on top of your PR alternatively.
2024-08-26 01:49:02 +02:00
Matthias Krüger aa26e1ad97
Rollup merge of #129525 - notriddle:notriddle/fake-variadic-tuple-array, r=GuillaumeGomez
rustdoc: clean up tuple <-> primitive conversion docs

This adds a minor missing feature to `fake_variadic`, so that it can render `impl From<(T,)> for [T; 1]` correctly.
2024-08-26 01:49:02 +02:00
Matthias Krüger ae21236530
Rollup merge of #129519 - compiler-errors:lowering-flags, r=fmease
Remove redundant flags from `lower_ty_common` that can be inferred from the HIR

...and then get rid of `lower_ty_common`.

r? ``@fmease`` or re-roll if you're busy!
2024-08-26 01:49:01 +02:00
Matthias Krüger 5a07308a14
Rollup merge of #129518 - GrigorenkoPV:gitignore-library-ice, r=tgross35
gitignore: ignore ICE reports regardless of directory

Quite often when working on compiler I end up running into ICEs during the standard library compilation.

These ICEs generate reports in `/library/` and not at the root of the repo, so they aren't `gitignore`d.

I finally ended up committing one today, by accident: https://github.com/rust-lang/rust/pull/129487#event-14002067843
2024-08-26 01:49:01 +02:00
Matthias Krüger 6228bd6ef6
Rollup merge of #129405 - surechen:fix_span_x, r=cjgillot
Fixing span manipulation and indentation of the suggestion introduced by #126187

According to comments:
https://github.com/rust-lang/rust/pull/128084#issuecomment-2295254576
https://github.com/rust-lang/rust/pull/126187/files#r1634897691
2024-08-26 01:49:00 +02:00
Matthias Krüger 621f2726fb
Rollup merge of #129288 - compiler-errors:unsafe-fn-coercion, r=lcnr
Use subtyping for `UnsafeFnPointer` coercion, too

I overlooked this in #129059, which changed MIR typechecking to use subtyping for other fn pointer coercions.

Fixes #129285
2024-08-26 01:49:00 +02:00
bors 3f121b9461 Auto merge of #129488 - saethlin:alignment-precondition, r=workingjubilee
Enable Alignment::new_unchecked precondition check

Similar to what happened with https://github.com/rust-lang/rust/pull/126556, I think this has become palatable since https://github.com/rust-lang/rust/pull/126793.
2024-08-25 23:45:25 +00:00
Rémy Rakic 5d83cb27c8 allow `llvm.libzstd` with `download-ci-llvm = true`
but warn about it
2024-08-25 22:17:51 +00:00
Rémy Rakic 650ba7fdf0 enable `llvm.libzstd` on test x64 linux builder 2024-08-25 22:17:51 +00:00
Rémy Rakic 7963beda24 strip whitespace for ignored tests reason comments 2024-08-25 22:17:51 +00:00
Rémy Rakic 62c8c693bd move and rename zstd script
move it where it's used, and name it like the other scripts
2024-08-25 22:17:51 +00:00
Rémy Rakic 1935e21029 expand zstd debuginfo compression test
it now checks zlib and zstd, via rustc and rust-lld
2024-08-25 22:17:51 +00:00
Rémy Rakic 802222fefc prepare test for expanding scope 2024-08-25 22:17:51 +00:00
Rémy Rakic 79f3c51a01 mark `rust-lld-compress-debug-sections` test as needing zstd
also make it fail if there's a compression issue
2024-08-25 22:17:51 +00:00
Rémy Rakic 5b374631df compiletest: implement `needs-lvm-zstd` directive 2024-08-25 22:17:51 +00:00
Martin Kröning edeefc532f
pal/hermit: saturate `usleep` microseconds at `u64::MAX`
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
2024-08-26 00:04:00 +02:00
Michael Goulet 1c58522068 Use FxHasher on new solver unconditionally 2024-08-25 16:37:15 -04:00
bors c6db1ca3c9 Auto merge of #129563 - matthiaskrgr:rollup-t6bai2d, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #129091 (add Box::as_ptr and Box::as_mut_ptr methods)
 - #129134 (bootstrap: improve error recovery flags to curl)
 - #129416 (library: Move unstable API of new_uninit to new features)
 - #129459 (handle stage0 `cargo` and `rustc` separately)
 - #129487 (repr_transparent_external_private_fields: special-case some std types)
 - #129511 (Update minifier to 0.3.1)
 - #129523 (Make `rustc_type_ir` build on stable)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-25 20:29:33 +00:00
Michael Goulet ecd2d11573 Remove redundant flags that can be inferred from the HIR 2024-08-25 16:21:00 -04:00
Michael Goulet 48f43fa0ed Avoid taking reference of &TyKind 2024-08-25 16:02:29 -04:00
Ben Kimock b1c2c78d29 Tweak some attributes to improve panic_immediate_abort 2024-08-25 14:52:53 -04:00
Martin Kröning 687c8a1eab
pal/hermit: correctly round up microseconds in `Thread::sleep`
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
2024-08-25 20:49:23 +02:00
Ralf Jung 21dd88f963 exit: explain our expectations for the exit handlers registered in a Rust program 2024-08-25 17:46:26 +02:00
Jack O'Connor 3153b7d7b4 link to Future::poll from the Poll docs
The most important thing about Poll is that Future::poll returns it, but
previously the docs didn't emphasize this.
2024-08-25 08:35:06 -07:00
Matthias Krüger 86d5c53362
Rollup merge of #129523 - lqd:stable-type-ir, r=compiler-errors
Make `rustc_type_ir` build on stable

This PR fixes a handful of issues that appear in `rustc_type_ir` when trying to build the new solver on stable.

r? ```@compiler-errors```
```@bors``` rollup
2024-08-25 16:51:06 +02:00
Matthias Krüger c6f7b1f390
Rollup merge of #129511 - GuillaumeGomez:update-minifier, r=notriddle
Update minifier to 0.3.1

It adds support for escaped characters.

PR is https://github.com/GuillaumeGomez/minifier-rs/pull/111.

r? ````@notriddle````
2024-08-25 16:51:06 +02:00
Matthias Krüger 9c59e97ded
Rollup merge of #129487 - GrigorenkoPV:repr_transparent_external_private_fields, r=compiler-errors
repr_transparent_external_private_fields: special-case some std types

Fixes #129470

```@rustbot``` label +A-lint +L-repr_transparent_external_private_fields
2024-08-25 16:51:05 +02:00
Matthias Krüger a44e5a94ab
Rollup merge of #129459 - onur-ozkan:separate-stage0-bins, r=Kobzol
handle stage0 `cargo` and `rustc` separately

This change allows setting either `build.cargo` or `build.rustc` without requiring both to be set simultaneously, which was not possible previously.

To try it, set `build.rustc` without setting `build.cargo`, and try to bootstrap on clean build.

Blocker for https://github.com/rust-lang/rust/pull/129152
2024-08-25 16:51:05 +02:00
Matthias Krüger 0e2523eaf8
Rollup merge of #129416 - workingjubilee:partial-move-from-stabilization, r=dtolnay
library: Move unstable API of new_uninit to new features

- `new_zeroed` variants move to `new_zeroed_alloc`
- the `write` fn moves to `box_uninit_write`

The remainder will be stabilized in upcoming patches, as it was decided to only stabilize `uninit*` and `assume_init`.
2024-08-25 16:51:04 +02:00
Matthias Krüger 8e27d4ce42
Rollup merge of #129134 - lolbinarycat:continue-at, r=Kobzol
bootstrap: improve error recovery flags to curl

alternative to #128459

fixes #110178

r? ````@Kobzol````
2024-08-25 16:51:04 +02:00
Matthias Krüger 7edbd6353b
Rollup merge of #129091 - RalfJung:box_as_ptr, r=Amanieu
add Box::as_ptr and Box::as_mut_ptr methods

Unstably implements https://github.com/rust-lang/libs-team/issues/355. Tracking issue: https://github.com/rust-lang/rust/issues/129090.

r? libs-api
2024-08-25 16:51:03 +02:00
bors 1a94d839be Auto merge of #129295 - Zalathar:profiler-builtins, r=Kobzol
Build `library/profiler_builtins` from `ci-llvm` if appropriate

Running all of `tests/coverage` requires the LLVM profiler runtime, which requires setting `build.profiler = true`.

Historically, doing that has required checking out the entire `src/llvm-project` submodule. For compiler contributors who otherwise don't need that submodule (thanks to `download-ci-vm`), that's quite inconvenient.

However, thanks to #129116, the downloaded CI LLVM tarball now contains a copy of LLVM's `compiler-rt` directory, which includes all the files needed to build the profiler runtime. So with a little bit of extra logic in bootstrap, we can have `library/profiler_builtins` look for the `compiler-rt` files in `ci-llvm` instead of the `src/llvm-project` submodule.
2024-08-25 14:44:55 +00:00
Guillaume Gomez ca6be7414a Add regression test for impl associated types source link 2024-08-25 16:22:35 +02:00
Guillaume Gomez b581fed15e Generate missing source link on impl associated types 2024-08-25 16:22:35 +02:00
surechen 8750e24247 Fixing span manipulation and indentation of the suggestion introduced by #126187
According to comments:
https://github.com/rust-lang/rust/pull/128084#issuecomment-2295254576
https://github.com/rust-lang/rust/pull/126187/files#r1634897691
2024-08-25 20:30:06 +08:00
bors 89103466d7 Auto merge of #129531 - Jarcho:clippyup, r=Manishearth
Clippy subtree update

r? `@Manishearth`
2024-08-25 11:56:57 +00:00
Ralf Jung ba24121ad6 tweak rustc_allow_const_fn_unstable hint, and add back test for stable-const-can-only-call-stable-const 2024-08-25 13:50:55 +02:00
Ralf Jung 5412499ad5 make it possible to enable const_precise_live_drops per-function 2024-08-25 13:49:16 +02:00
Pavel Grigorenko c29e328f6a gitignore: ignore ICE reports regardless of directory 2024-08-25 14:19:05 +03:00
Ralf Jung a772db4206 ub_checks intrinsics: fall back to cfg(ub_checks) 2024-08-25 13:15:48 +02:00
Ralf Jung 74a21425cc dont iterate over the bitset 2024-08-25 12:33:55 +02:00
Ralf Jung 172c05cca2 only visit reachable blocks, do not use a visitor 2024-08-25 11:42:55 +02:00
bors 717aec0f8e Auto merge of #129521 - matthiaskrgr:rollup-uigv77m, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #128596 (stabilize const_fn_floating_point_arithmetic)
 - #129199 (make writes_through_immutable_pointer a hard error)
 - #129246 (Retroactively feature gate `ConstArgKind::Path`)
 - #129290 (Pin `cc` to 1.0.105)
 - #129323 (Implement `ptr::fn_addr_eq`)
 - #129500 (remove invalid `TyCompat` relation for effects)
 - #129501 (panicking: improve hint for Miri's RUST_BACKTRACE behavior)
 - #129505 (interpret: ImmTy: tighten sanity checks in offset logic)
 - #129510 (Fix `elided_named_lifetimes` in code)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-25 08:12:16 +00:00
bors 697d9530d7 Auto merge of #129540 - tgross35:rollup-y6iaujw, r=tgross35
Rollup of 10 pull requests

Successful merges:

 - #128467 (Detect `*` operator on `!Sized` expression)
 - #128524 (Don't suggest turning crate-level attributes into outer style)
 - #128735 (Add a special case for `CStr`/`CString` in the `improper_ctypes` lint)
 - #129429 (Print the generic parameter along with the variance in dumps.)
 - #129430 (rustdoc: show exact case-sensitive matches first)
 - #129449 (Put Pin::as_deref_mut in impl Pin<Ptr> / rearrange Pin methods)
 - #129481 (Update `compiler_builtins` to `0.1.121`)
 - #129482 (Add myself to the review rotation for libs)
 - #129492 (Make wasm32 platform support docs easier to read)
 - #129512 (update the doc comment on lintchecker b/c it parses html now)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-25 05:45:02 +00:00
mu001999 e7f11b6913 Removes dead code from the compiler 2024-08-25 13:41:39 +08:00
Trevor Gross 11ebb597cd
Rollup merge of #129512 - lolbinarycat:linkchecker-impl-docs, r=ehuss
update the doc comment on lintchecker b/c it parses html now
2024-08-24 21:03:34 -05:00
Trevor Gross 2412d3c317
Rollup merge of #129492 - tshepang:patch-2, r=chenyukang
Make wasm32 platform support docs easier to read
2024-08-24 21:03:34 -05:00
Trevor Gross dd05261e80
Rollup merge of #129482 - thomcc:add-to-review-rotation, r=jieyouxu
Add myself to the review rotation for libs

I am feeling better, and my new job gives me some time to do this.
2024-08-24 21:03:34 -05:00
Trevor Gross 678193f7d1
Rollup merge of #129481 - scottmcm:update-cb, r=tgross35
Update `compiler_builtins` to `0.1.121`

To pick up https://github.com/rust-lang/compiler-builtins/pull/673 and unblock https://github.com/rust-lang/rust/pull/129403

r? tgross35
2024-08-24 21:03:33 -05:00
Trevor Gross e96faab70b
Rollup merge of #129449 - coolreader18:pin-as_deref_mut-signature, r=dtolnay
Put Pin::as_deref_mut in impl Pin<Ptr> / rearrange Pin methods

Tracking issue: #86918

Based on the suggestion in https://github.com/rust-lang/rust/issues/86918#issuecomment-2189367582

> Some advantages:
>
>  * Synergy with the existing `as_ref` and `as_mut` signatures (stable since Rust 1.33)
>
>  * Lifetime elision reduces noise in the signature
>
>  * Turbofish less verbose: `Pin::<&mut T>::as_deref_mut` vs `Pin::<&mut Pin<&mut T>>::as_deref_mut`

The comment seemed to imply that `Pin::as_ref` and `Pin::as_mut` already share an impl block, which they don't. So, I rearranged it so that they do, and we can see which looks better in the docs.

<details><summary><b>Docs screenshots</b></summary>

Current nightly:
![image](https://github.com/user-attachments/assets/b432cb82-8f4b-48ae-bafc-2fe49d0ad48c)

`Pin::as_deref_mut` moved into the same block as `as_mut`:
![image](https://github.com/user-attachments/assets/f9b35722-6a88-4465-ad1c-28d8e91902ac)

`Pin::as_ref`, `as_mut`, and `as_deref_mut` all in the same block:
![image](https://github.com/user-attachments/assets/9a1b2bf0-70a6-4751-b13f-390f1d575244)

</details>

I think I like the last one the most; obviously I'm biased since I'm the one who rearranged it, but it doesn't make sense to me to have `as_ref` methods split up by an `into_inner` method.

r? dtolnay
2024-08-24 21:03:33 -05:00