Commit graph

264924 commits

Author SHA1 Message Date
bors
7bd8b07ebd Auto merge of #131695 - cuviper:stable-1.82.0, r=cuviper
[stable] Prepare Rust 1.82.0

r? ghost
2024-10-14 19:25:17 +00:00
Josh Stone
7ad638e7f0 bump channel to stable 2024-10-14 10:09:25 -07:00
Josh Stone
096576bd9e Sync release notes from master and #131137 2024-10-14 10:07:22 -07:00
bors
763ad520cc Auto merge of #131423 - cuviper:beta-next, r=cuviper
[beta] backports

- Only add an automatic SONAME for Rust dylibs #130960
- Reject leading unsafe in `cfg!(...)` and `--check-cfg` #131057, resolving https://github.com/rust-lang/rust/issues/131055
- Disable jump threading `UnOp::Not` for non-bool #131201
- Update LLVM submodule #131448
- Split x86_64-msvc-ext into two jobs #130072
- Use a small runner for msvc-ext2 job #130151

r? ghost
2024-10-12 05:42:23 +00:00
Chris Denton
1439844faa Use small runner for msvc-ext2 job
(cherry picked from commit ebe4fc4e12)
2024-10-11 21:53:09 -07:00
Chris Denton
9bc41656ce Fix bash syntax
(cherry picked from commit 0d94e6bac9)
2024-10-11 21:52:57 -07:00
Chris Denton
f07c6ac2db Fix checktools.sh non-msvc builds
(cherry picked from commit 2f6307d1cc)
2024-10-11 21:52:57 -07:00
Chris Denton
195a9d53a1 Split x86_64-msvc-ext into two jobs
(cherry picked from commit 7358429c00)
2024-10-11 21:52:57 -07:00
DianQK
d4b2e84754 Update LLVM submodule
(cherry picked from commit e1c0f0488bb1eda68e45ff58c0eb5ce411a62275)
2024-10-11 08:56:20 -07:00
Michael Goulet
0fb2b24bf1 Disable jump threading UnOp::Not for non-bool
(cherry picked from commit f0bfba2583)
2024-10-11 08:45:19 -07:00
Michael Goulet
692821d503 Failing diff test
(cherry picked from commit 9c91a4ef16)
2024-10-11 08:39:50 -07:00
Urgau
3fb4ade857 Reject leading unsafe in cfg!(...) and --check-cfg.
(cherry picked from commit 9cb540a13c)
2024-10-08 17:34:21 -07:00
Josh Stone
6917db611d Only add an automatic SONAME for Rust dylibs
(cherry picked from commit f46057bf1c)
2024-10-08 17:34:16 -07:00
bors
6a3b69c6b0 Auto merge of #130888 - cuviper:beta-next, r=cuviper
[beta] backports

- Use equality when relating formal and expected type in arg checking #129317
- Don't call `extern_crate` when local crate name is the same as a dependency and we have a trait error #130275
- bootstrap: Set the dylib path when building books with rustdoc #130536

r? cuviper
2024-09-27 12:43:29 +00:00
Josh Stone
1ddfc902b8 bootstrap: Set the dylib path when building books with rustdoc
The library path is needed when the toolchain has been configured with
`[rust] rpath = false`. Otherwise, building the reference book will get
an error when it tries to run rustdoc, like:

    rustdoc: error while loading shared libraries: librustc_driver-2ec457c3b8826b72.so

(cherry picked from commit de4c8975aa)
2024-09-26 08:46:26 -07:00
Michael Goulet
3cb89a05ad Don't call extern_crate when local crate name is the same as a dependency and we have a trait error
(cherry picked from commit 9d5d03b7de)
2024-09-26 08:46:22 -07:00
Michael Goulet
824971f5ba Inline expected_inputs_for_expected_output into check_argument_types/check_expr_struct_fields
(cherry picked from commit 95b9ecd6d6)
2024-09-26 08:46:16 -07:00
Michael Goulet
91b117bdc7 Use equality when relating formal and expected type in arg checking
(cherry picked from commit c3f9c4f4d4)
2024-09-26 08:46:15 -07:00
bors
8c27a2ba6b Auto merge of #130569 - cuviper:beta-next, r=cuviper
[beta] backports

- Don't warn empty branches unreachable for now #129103
- Win: Add dbghelp to the list of import libraries #130047
- `RepeatN`: use MaybeUninit #130145
- Update LLVM to 19 327ca6c #130212
- Revert #129749 to fix segfault in LLVM #130477
- Check params for unsafety in THIR #130531

r? cuviper
try-job: dist-various-1
2024-09-21 19:10:44 +00:00
Josh Stone
4bf632f51e Limit run-make tests using -Zbuild-std to nightly
See https://github.com/rust-lang/rust/issues/130634
2024-09-20 13:31:21 -07:00
Michael Goulet
49891df793 Check params for unsafety in THIR
(cherry picked from commit 12f2bcde63)
2024-09-19 08:17:12 -07:00
Tyler Mandry
85f29bda08 Revert "Rollup merge of #129749 - krasimirgg:llvm-20-lto, r=nikic"
This reverts commit 8c7a7e346b, reversing
changes made to a00bd75b6c.

(cherry picked from commit 472fef6a70)
2024-09-19 08:16:51 -07:00
DianQK
f004b77fde Update LLVM to 19 327ca6c
(cherry picked from commit 7c692e13b1)
2024-09-19 08:16:44 -07:00
Deadbeef
e7246aefbe RepeatN: use MaybeUninit
(cherry picked from commit 4c8b84ae82)
2024-09-18 09:25:10 -07:00
Chris Denton
03faf4f986 Win: Add dbghelp to the list of import libraries
(cherry picked from commit 8966207afd)
2024-09-18 09:25:07 -07:00
Nadrieril
7410cbf03f Revert warning empty patterns as unreachable
(cherry picked from commit 5b7be148ea)
2024-09-18 09:24:42 -07:00
bors
4976ae480e Auto merge of #130045 - BoxyUwU:bump-beta-bootstrap, r=cuviper
[beta] bump stage0

bumps stage0 to stable 1.81.0
2024-09-09 03:29:33 +00:00
Boxy
e6dbc2433c bump stage0 2024-09-06 22:07:19 +01:00
bors
c7c49f44a7 Auto merge of #129961 - pietroalbini:pa-cve-2024-43402-beta, r=Amanieu
[beta] Fix CVE-2024-43402

Backport the fix for CVE-2024-43402 in beta. See [GHSA-2xg3-7mm6-98jj](https://github.com/rust-lang/rust/security/advisories/GHSA-2xg3-7mm6-98jj) for more information about it.

r? `@ghost`
2024-09-04 20:05:52 +00:00
Chris Denton
804ac06852
More robust extension checking 2024-09-03 14:37:25 +02:00
bors
fb1a6f7f4e Auto merge of #129902 - BoxyUwU:beta, r=BoxyUwU
[beta] Prepare Rust 1.82.0

r? `@ghost`
2024-09-03 08:08:31 +00:00
Boxy
1154ecc251 Backport #129917 2024-09-02 22:24:33 +01:00
Boxy
f79a6cd952 bump channel to beta 2024-09-02 17:49:19 +01:00
Boxy
93212be0a7 replace placeholder version 2024-09-02 17:48:42 +01:00
bors
a7399ba69d Auto merge of #129831 - matthiaskrgr:rollup-befq6zx, r=matthiaskrgr
Rollup of 11 pull requests

Successful merges:

 - #128523 (Add release notes for 1.81.0)
 - #129605 (Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen)
 - #129650 (Clean up `library/profiler_builtins/build.rs`)
 - #129651 (skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set)
 - #129684 (Enable Miri to pass pointers through FFI)
 - #129762 (Update the `wasm-component-ld` binary dependency)
 - #129782 (couple more crash tests)
 - #129816 (tidy: say which feature gate has a stability issue mismatch)
 - #129818 (make the const-unstable-in-stable error more clear)
 - #129824 (Fix code examples buttons not appearing on click on mobile)
 - #129826 (library: Fix typo in `core::mem`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-31 20:59:27 +00:00
Matthias Krüger
4151fd407e
Rollup merge of #129826 - Alcaro:patch-1, r=workingjubilee
library: Fix typo in `core::mem`

This typo looks unnecessary
2024-08-31 20:36:28 +02:00
Matthias Krüger
828f7c895a
Rollup merge of #129824 - GuillaumeGomez:code-example-buttons-mobile, r=notriddle
Fix code examples buttons not appearing on click on mobile

When browsing docs on mobile today, I realized that the buttons didn't appear when I tapped on the code example.

One issue: I have no idea how to add a regression test for this case...

r? ``@notriddle``
2024-08-31 20:36:27 +02:00
Matthias Krüger
b8b2a65035
Rollup merge of #129818 - RalfJung:const-stability, r=compiler-errors
make the const-unstable-in-stable error more clear

The default should be to add `rustc_const_unstable`, not `rustc_allow_const_fn_unstable`.

Also I discovered our check for missing const stability attributes on stable functions -- but strangely that check only kicks in for "reachable" functions. `check_missing_stability` checks for reachability since all reachable functions must have a stability attribute, but I would say if a function has `#[stable]` it should also have const-stability attributes regardless of reachability.
2024-08-31 20:36:27 +02:00
Matthias Krüger
08b813b30e
Rollup merge of #129816 - RalfJung:tidy-feature-issue-mismatch, r=compiler-errors
tidy: say which feature gate has a stability issue mismatch

This gives some valuable context to what the error is actually about :)
2024-08-31 20:36:26 +02:00
Matthias Krüger
1e0cc8bec3
Rollup merge of #129782 - matthiaskrgr:c, r=jieyouxu
couple more crash tests

r? ```@jieyouxu```
2024-08-31 20:36:26 +02:00
Matthias Krüger
0afda15f05
Rollup merge of #129762 - alexcrichton:update-wasm-component-ld, r=jieyouxu
Update the `wasm-component-ld` binary dependency

This keeps it up-to-date by moving from 0.5.6 to 0.5.7. While here I've additionally updated some other wasm-related dependencies in the workspace to keep them up-to-date and try to avoid duplicate versions as well.
2024-08-31 20:36:25 +02:00
Matthias Krüger
a5fb8b90bf
Rollup merge of #129684 - Strophox:miri-pass-pointer-to-ffi, r=RalfJung
Enable Miri to pass pointers through FFI

Following https://github.com/rust-lang/rust/pull/126787, the purpose of this PR is to now enable Miri to execute native calls that make use of pointers.

> <details>
>
> <summary> Simple example </summary>
>
> ```rust
> extern "C" {
>     fn ptr_printer(ptr: *mut i32);
> }
>
> fn main() {
>     let ptr = &mut 42 as *mut i32;
>     unsafe {
>         ptr_printer(ptr);
>     }
> }
> ```
> ```c
> void ptr_printer(int *ptr) {
>   printf("printing pointer dereference from C: %d\n", *ptr);
> }
> ```
> should now show `printing pointer dereference from C: 42`.
>
> </details>

Note that this PR does not yet implement any logic involved in updating Miri's "analysis" state (byte initialization, provenance) upon such a native call.

r? ``@RalfJung``
2024-08-31 20:36:25 +02:00
Matthias Krüger
e3795af77f
Rollup merge of #129651 - onur-ozkan:stage0-target-sanity-check, r=Kobzol
skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set

When adding a new target to `rustc` and extending `STAGE0_MISSING_TARGETS`, there is a chance that in the merge CI bootstrap target sanity check might fail [here](26d27b7c87/src/bootstrap/src/core/sanity.rs (L243-L256)) because the stage 0 compiler will assume to already support the new target since `opt-dist` uses the previously compiled compiler as the stage 0 compiler.

This PR skips this check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set, and makes `opt-dist` to set `BOOTSTRAP_SKIP_TARGET_SANITY` so bootstrap doesn't run this logic for opt-dist tests.

Fixes https://github.com/rust-lang/rust/pull/127021#issuecomment-2308782315.

Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/.60STAGE0_MISSING_TARGETS.60.20seems.20to.20check.20stage1

Blocker for https://github.com/rust-lang/rust/pull/127021
2024-08-31 20:36:24 +02:00
Matthias Krüger
6a96e7a255
Rollup merge of #129650 - Zalathar:profiler-builtins, r=Mark-Simulacrum
Clean up `library/profiler_builtins/build.rs`

This PR makes a series of improvements to the long-neglected build script for `profiler_builtins`.

Most notably:
- The logic that silently skips missing source files has been removed, since it is currently unnecessary and makes build errors more confusing.
- The script now emits `cargo::rerun-if-changed` directives for the `compiler-rt` source and include directories.

Compiler behaviour and user programs should be unaffected by these changes.
2024-08-31 20:36:24 +02:00
Matthias Krüger
d354d4ddd7
Rollup merge of #129605 - jieyouxu:needs-llvm-components, r=Mark-Simulacrum
Add missing `needs-llvm-components` directives for run-make tests that need target-specific codegen

Without suitable `needs-llvm-components` directives, some run-make tests exercising target-specific codegen can fail if the LLVM used is built without the necessary components. Currently, the list is:

```
tests\run-make\print-target-list
tests\run-make\print-to-output
tests\run-make\print-cfg
tests\run-make\target-without-atomic-cas
```

This PR also skips tidy checks for revisions and `needs-llvm-components` for run-make tests since revisions are not supported.

Fixes #129390.
Fixes #127895.

cc ``@petrochenkov`` who noticed this, thanks! Would be great if you could confirm that this fixes the test errors for you locally.
2024-08-31 20:36:23 +02:00
Matthias Krüger
71240e4805
Rollup merge of #128523 - cuviper:relnotes-1.81.0, r=Mark-Simulacrum
Add release notes for 1.81.0

cc ``@rust-lang/release``
r? ``@Mark-Simulacrum``
2024-08-31 20:36:23 +02:00
Alcaro
7d728e54d9
Update mod.rs
This typo looks unnecessary
2024-08-31 19:09:41 +02:00
bors
d571ae851d Auto merge of #129817 - matthiaskrgr:rollup-ll2ld5m, r=matthiaskrgr
Rollup of 12 pull requests

Successful merges:

 - #129659 (const fn stability checking: also check declared language features)
 - #129711 (Expand NLL MIR dumps)
 - #129730 (f32 docs: define 'arithmetic' operations)
 - #129733 (Subtree update of `rust-analyzer`)
 - #129749 (llvm-wrapper: adapt for LLVM API changes)
 - #129757 (Add a test for trait solver overflow in MIR inliner cycle detection)
 - #129760 (Make the "detect-old-time" UI test more representative)
 - #129767 (Remove `#[macro_use] extern crate tracing`, round 4)
 - #129774 (Remove `#[macro_use] extern crate tracing` from rustdoc and rustfmt)
 - #129785 (Miri subtree update)
 - #129791 (mark joboet as on vacation)
 - #129812 (interpret, codegen: tweak some comments and checks regarding Box with custom allocator)

Failed merges:

 - #129777 (Add `unreachable_pub`, round 4)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-08-31 16:43:26 +00:00
Guillaume Gomez
670a78b3a7 Fix code examples buttons not appearing on click on mobile 2024-08-31 17:26:54 +02:00
Ralf Jung
3cec2d6935 don't take reachability into account when warning about missing-const-stability 2024-08-31 15:11:48 +02:00