Commit Graph

264581 Commits

Author SHA1 Message Date
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
Trevor Gross
093249af70
Rollup merge of #129430 - lolbinarycat:rustdoc-search-exact-case, r=notriddle
rustdoc: show exact case-sensitive matches first

fixes #119480
2024-08-24 21:03:32 -05:00
Trevor Gross
2269381e0a
Rollup merge of #129429 - cjgillot:named-variance, r=compiler-errors
Print the generic parameter along with the variance in dumps.

This allows to make sure we are testing what we think we are testing.

While the tests are correct, I discovered that opaque duplicated args are in the reverse declaration order.
2024-08-24 21:03:32 -05:00
Trevor Gross
198a68df1c
Rollup merge of #128735 - jieyouxu:pr-120176-revive, r=cjgillot
Add a special case for `CStr`/`CString` in the `improper_ctypes` lint

Revives #120176. Just needed to bless a test and fix an argument, but seemed reasonable to me otherwise.

Instead of saying to "consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct", we now tell users to "Use `*const ffi::c_char` instead, and pass the value from `CStr::as_ptr()`" when the type involved is a `CStr` or a `CString`.

The suggestion is not made for `&mut CString` or `*mut CString`.

r? ``````@cjgillot`````` (since you were the reviewer of the original PR #120176, but feel free to reroll)
2024-08-24 21:03:31 -05:00
Trevor Gross
dfe7d5c31e
Rollup merge of #128524 - chenyukang:yukang-fix-127930-invalid-outer-style-sugg, r=cjgillot
Don't suggest turning crate-level attributes into outer style

Fixes #127930
2024-08-24 21:03:31 -05:00
Trevor Gross
00308920ae
Rollup merge of #128467 - estebank:unsized-args, r=cjgillot
Detect `*` operator on `!Sized` expression

The suggestion is new:

```
error[E0277]: the size for values of type `str` cannot be known at compilation time
  --> $DIR/unsized-str-in-return-expr-arg-and-local.rs:15:9
   |
LL |     let x = *"";
   |         ^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `str`
   = note: all local variables must have a statically known size
   = help: unsized locals are gated as an unstable feature
help: references to `!Sized` types like `&str` are `Sized`; consider not dereferencing the expression
   |
LL -     let x = *"";
LL +     let x = "";
   |
```

Fix #128199.
2024-08-24 21:03:30 -05:00
beetrees
abd44fc5f4
Add f16 and f128 inline ASM support for aarch64 2024-08-25 00:13:25 +01:00
Jason Newcomb
6c3f43d5cc Merge commit '0f8eabd6231366bfc1bb1464601297c2d48f8f68' into clippyup 2024-08-24 18:33:44 -04:00
Michael Goulet
dbf06d2170 Get rid of predicates_defined_on 2024-08-24 18:25:41 -04:00
rongfu.leng
ec67cdf98a
Enable f16 in assembly on aarch64 platforms that support it
Signed-off-by: rongfu.leng <lenronfu@gmail.com>
2024-08-24 23:07:09 +01:00
binarycat
56adf87213 rewrite extract_curl_version again 2024-08-24 17:30:33 -04:00
Michael Howell
6df0ccf49e 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-24 14:06:57 -07:00