1
Fork 0
Commit graph

280836 commits

Author SHA1 Message Date
Guillaume Gomez
17cf100f11 Add regression test for #136899 2025-02-12 19:46:07 +01:00
Guillaume Gomez
54f59c6dda Correctly escape hashtags when running invalid_rust_codeblocks lint 2025-02-12 19:46:07 +01:00
bors
8c04e39595 Auto merge of #136809 - workingjubilee:rollup-jk0pew1, r=workingjubilee
Rollup of 12 pull requests

Successful merges:

 - #136053 (coverage: Defer part of counter-creation until codegen)
 - #136201 (Removed dependency on the field-offset crate, alternate approach)
 - #136228 (Simplify Rc::as_ptr docs + typo fix)
 - #136353 (fix(libtest): Enable Instant on Emscripten targets)
 - #136472 ([`compiletest`-related cleanups 2/7] Feed stage number to compiletest directly)
 - #136487 (ci: stop mysql before removing it)
 - #136552 (Use an `Option` for `FindNextFileHandle` in `ReadDir` instead of `INVALID_FILE_HANDLE` sentinel value)
 - #136705 (Some miscellaneous edition-related library tweaks)
 - #136707 (Bump `cc` to v1.2.13 for the compiler workspace)
 - #136790 (Git blame ignore recent formatting commit)
 - #136792 (Don't apply editorconfig to llvm)
 - #136805 (ignore win_delete_self test in Miri)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-10 11:38:45 +00:00
Jubilee
ffa8a96040
Rollup merge of #136805 - RalfJung:miri-win-delete-self, r=Noratrieb
ignore win_delete_self test in Miri

Follow-up to https://github.com/rust-lang/rust/pull/134679, fixes miri-test-libstd on Windows

Cc `@ChrisDenton` `@Mark-Simulacrum`
2025-02-10 00:51:58 -08:00
Jubilee
3e5f489be5
Rollup merge of #136792 - jyn514:editor-config, r=jieyouxu
Don't apply editorconfig to llvm

They use 2 spaces by default, not 4.
2025-02-10 00:51:56 -08:00
Jubilee
a39b275495
Rollup merge of #136790 - ehuss:ignore-rustfmt-2024-again, r=compiler-errors
Git blame ignore recent formatting commit

This ignores the commit 1fcae03369 from https://github.com/rust-lang/rust/pull/136751 that applied updating formatting changes.
2025-02-10 00:51:55 -08:00
Jubilee
26ca716f79
Rollup merge of #136707 - clubby789:cmake-bisect, r=jieyouxu
Bump `cc` to v1.2.13 for the compiler workspace
2025-02-10 00:51:54 -08:00
Jubilee
72f0205d28
Rollup merge of #136705 - compiler-errors:edition-library, r=jhpratt
Some miscellaneous edition-related library tweaks

Some library edition tweaks that can be done separately from upgrading the whole standard library to edition 2024 (which is blocked on getting the submodules upgraded, for example)
2025-02-10 00:51:54 -08:00
Jubilee
f471ce39fb
Rollup merge of #136552 - ChrisDenton:option-find-handle, r=Mark-Simulacrum
Use an `Option` for `FindNextFileHandle` in `ReadDir` instead of `INVALID_FILE_HANDLE` sentinel value

Sometimes we store an invalid handle when we don't want to return an error. We then check the handle before use in order to avoid actually using the invalid handle. However, using an `Option` for this is better and avoids us forgetting to check the handle is valid. This was noticed due to us closing the handle without checking for validity: bd6a6777f5/library/std/src/sys/pal/windows/fs.rs (L148-L151)
2025-02-10 00:51:53 -08:00
Jubilee
e1bd25e970
Rollup merge of #136487 - marcoieni:disable-mysql-systemctl, r=Mark-Simulacrum
ci: stop mysql before removing it

try-job: aarch64-gnu
2025-02-10 00:51:52 -08:00
Jubilee
2a608f009e
Rollup merge of #136472 - jieyouxu:pass-stage, r=Mark-Simulacrum
[`compiletest`-related cleanups 2/7] Feed stage number to compiletest directly

Reference for overall changes: https://github.com/rust-lang/rust/pull/136437
Part **2** of **7** of the *`compiletest`-related cleanups* PR series.

### Summary

- Pass stage number via new `--stage` compiletest flag directly from bootstrap, instead of deriving that info in compiletest by doing gymnastics on `--stage-id`.
- Just a cleanup, should have no functional changes.

r? bootstrap
2025-02-10 00:51:52 -08:00
Jubilee
6ef2cd8e1c
Rollup merge of #136353 - purplesyringa:libtest-instant-wasm, r=Mark-Simulacrum
fix(libtest): Enable Instant on Emscripten targets

`Instant::now()` works correctly on Emscripten since https://github.com/rust-lang/libc/pull/3962. All wasm-family targets with OS support can now handle instants.

Improves #131738.

~~This changes the behavior of libtest on `unknown-unknown`/`unknown-none` wasm targets, but as far as I can see, libtest doesn't support them anyway. (Can anyone double-check?)~~ UPD: this patch no longer affects `unknown-unknown` targets.

``@rustbot`` label +A-libtest +T-testing-devex +O-emscripten +O-wasm -needs-triage
2025-02-10 00:51:51 -08:00
Jubilee
888b438476
Rollup merge of #136228 - hkBst:patch-28, r=Mark-Simulacrum
Simplify Rc::as_ptr docs + typo fix
2025-02-10 00:51:50 -08:00
Jubilee
ae732f3f65
Rollup merge of #136201 - davidv1992:eliminate-field-offset-alt, r=Mark-Simulacrum
Removed dependency on the field-offset crate, alternate approach

This is an alternate approach to reach the same goals as #136003. As it touches the core of the query system, this too probably should be evaluated for performance.

r? ``@Mark-Simulacrum``
2025-02-10 00:51:50 -08:00
Jubilee
7f8108afc8
Rollup merge of #136053 - Zalathar:defer-counters, r=saethlin
coverage: Defer part of counter-creation until codegen

Follow-up to #135481 and #135873.

One of the pleasant properties of the new counter-assignment algorithm is that we can stop partway through the process, store the intermediate state in MIR, and then resume the rest of the algorithm during codegen. This lets it take into account which parts of the control-flow graph were eliminated by MIR opts, resulting in fewer physical counters and simpler counter expressions.

Those improvements end up completely obsoleting much larger chunks of code that were previously responsible for cleaning up the coverage metadata after MIR opts, while also doing a more thorough cleanup job.

(That change also unlocks some further simplifications that I've kept out of this PR to limit its scope.)
2025-02-10 00:51:49 -08:00
bors
80c091958f Auto merge of #136803 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2025-02-10 08:46:37 +00:00
clubby789
09f57b2e5c Bump cc to v1.2.13 for the compiler workspace 2025-02-10 00:06:31 -08:00
Ralf Jung
2f3c943f42 ignore win_delete_self test in Miri 2025-02-10 08:08:32 +01:00
Laurențiu Nicola
8fd713b7d3
Merge pull request #19126 from lnicola/sync-from-rust
minor: Sync from downstream
2025-02-10 06:07:06 +00:00
Laurențiu Nicola
24d7a1490a Bump rustc crates 2025-02-10 07:52:04 +02:00
Laurențiu Nicola
15cd1f011c Merge from rust-lang/rust 2025-02-10 07:49:43 +02:00
Laurențiu Nicola
879dc387cd Preparing for merge from rust-lang/rust 2025-02-10 07:49:25 +02:00
bors
c03c38d5c2 Auto merge of #134740 - Flakebi:amdgpu-target, r=workingjubilee
Add amdgpu target

Add amdgpu target to rustc and enable the LLVM target.

Fix compiling `core` with the amdgpu:
The amdgpu backend makes heavy use of different address spaces. This
leads to situations, where a pointer in one addrspace needs to be casted
to a pointer in a different addrspace. `bitcast` is invalid for this
case, `addrspacecast` needs to be used.

Fix compilation failures that created bitcasts for such cases by
creating pointer casts (which creates an `addrspacecast` under the hood)
instead.

MCP: https://github.com/rust-lang/compiler-team/issues/823
Tracking issue: #135024
Kinda related to the original amdgpu tracking issue #51575 (though that one has been closed for a while).
2025-02-10 05:18:36 +00:00
bors
d9a4a47b8b Auto merge of #136785 - matthiaskrgr:rollup-sdhlna8, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #135488 (Stabilize `vec_pop_if`)
 - #136068 (crashes: more tests)
 - #136694 (Update minifier version to `0.3.4`)
 - #136722 (Visit all debug info in MIR Visitor)
 - #136746 (Emit an error if `-Zdwarf-version=1` is requested)
 - #136760 (Fix unwrap error in overflowing int literal)
 - #136782 (Fix mistake in x86_64-unknown-freebsd platform description)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-10 01:41:50 +00:00
jyn
df94005f1d Don't apply editorconfig to llvm
They use 2 spaces by default, not 4.
2025-02-09 16:21:14 -05:00
Alisa Sireneva
b01c7f6b9c fix(libtest): Enable Instant on Emscripten targets
`Instant::now()` works correctly on Emscripten since
https://github.com/rust-lang/libc/pull/3962. All wasm-family targets
with OS support can now handle instants.
2025-02-09 23:51:54 +03:00
Eric Huss
9a73f5a72d Git blame ignore recent formatting commit 2025-02-09 12:00:23 -08:00
Matthias Krüger
cfd65f0315
Rollup merge of #136782 - ehuss:freebsd-platform, r=jieyouxu
Fix mistake in x86_64-unknown-freebsd platform description

Fixes the description for x86_64-unknown-freebsd which looks to inadvertently say amd64.
2025-02-09 19:44:54 +01:00
Matthias Krüger
b5b460ddf1
Rollup merge of #136760 - chenyukang:fix-overflowing-int-lint-crash, r=oli-obk
Fix unwrap error in overflowing int literal

Fixes #136675

it's maybe `negative` only from [check_lit](526e3288fe/compiler/rustc_lint/src/types.rs (L546)), in this scenario the fields in `TypeLimits` is none.

r? ``@oli-obk``
2025-02-09 19:44:53 +01:00
Matthias Krüger
4b319bcada
Rollup merge of #136746 - wesleywiser:err_dwarf1, r=Urgau
Emit an error if `-Zdwarf-version=1` is requested

DWARF 1 is very different than DWARF 2+[^1] and LLVM does not really seem to support DWARF 1 as Clang does not offer a `-gdwarf-1` flag[^2] and `llc` will just generate DWARF 2 with the version set to 1[^3].

Since this isn't actually supported (and it's not clear it would be useful anyway), report that DWARF 1 is not supported if it is requested.

Also add a help message to the error saying which versions are supported.

cc #103057

[^1]: https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#index-gdwarf
[^2]: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-gdwarf
[^3]: https://godbolt.org/z/s85d87n3a
2025-02-09 19:44:53 +01:00
Matthias Krüger
d64bd3bedd
Rollup merge of #136722 - kornelski:visit-spans, r=chenyukang
Visit all debug info in MIR Visitor

I've been experimenting with simplifying debug info in MIR inliner, and discovered that MIR Visitor doesn't reliably visit all spans. This PR adds the missing visitor calls.
2025-02-09 19:44:52 +01:00
Matthias Krüger
370c8afa10
Rollup merge of #136694 - GuillaumeGomez:update-minifier, r=notriddle
Update minifier version to `0.3.4`

It fixes a bug where a whitespace would get removed in `a [attribute]` (you're not forced to add a tag before an attribute selector).

r? ````@notriddle````
2025-02-09 19:44:51 +01:00
Matthias Krüger
a2768a8b79
Rollup merge of #136068 - matthiaskrgr:crashesjan25, r=Mark-Simulacrum
crashes: more tests

try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: x86_64-gnu
try-job: dist-i586-gnu-i586-i686-musl
2025-02-09 19:44:51 +01:00
Matthias Krüger
b83a30c1b6
Rollup merge of #135488 - GrigorenkoPV:vec_pop_if, r=jhpratt
Stabilize `vec_pop_if`

Tracking issue: #122741

FCP completed in https://github.com/rust-lang/rust/issues/122741#issuecomment-2605116387
2025-02-09 19:44:50 +01:00
Eric Huss
2d0f31ba88 Fix mistake in x86_64-unknown-freebsd platform description 2025-02-09 09:53:16 -08:00
Michael Goulet
4312d7b541 Fix pattern matching mode changes and unsafe_op_in_unsafe_fn 2025-02-09 17:11:13 +00:00
Michael Goulet
a4e7f8f9bf Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
Michael Goulet
04bbc8340a Rename field in OnceWith from gen to make 2025-02-09 17:10:50 +00:00
Michael Goulet
9c486a74da Mark link_section attr with unsafe 2025-02-09 17:10:50 +00:00
Wesley Wiser
eea8ce5be4 Emit an error if -Zdwarf-version=1 is requested
DWARF 1 is very different than DWARF 2+ (see the commentary in
https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html#index-gdwarf)
and LLVM does not really seem to support DWARF 1 as Clang does not offer
a `-gdwarf-1` flag and `llc` will just generate DWARF 2 with the version
set to 1: https://godbolt.org/z/s85d87n3a.

Since this isn't actually supported (and it's not clear it would be
useful anyway), report that DWARF 1 is not supported if it is requested.

Also add a help message to the error saying which versions are supported.
2025-02-09 10:05:13 -06:00
bors
124cc92199 Auto merge of #136751 - bjorn3:update_rustfmt, r=Mark-Simulacrum
Update bootstrap compiler and rustfmt

The rustfmt version we previously used formats things differently from what the latest nightly rustfmt does. This causes issues for subtrees that get formatted both in-tree and in their own repo. Updating the rustfmt used in-tree solves those issues. Also bumped the bootstrap compiler as the stage0 update command always updates both at the same
time.
2025-02-09 15:44:16 +00:00
bors
a26e97be88 Auto merge of #136754 - Urgau:rollup-qlkhjqr, r=Urgau
Rollup of 5 pull requests

Successful merges:

 - #134679 (Windows: remove readonly files)
 - #136213 (Allow Rust to use a number of libc filesystem calls)
 - #136530 (Implement `x perf` directly in bootstrap)
 - #136601 (Detect (non-raw) borrows of null ZST pointers in CheckNull)
 - #136659 (Pick the max DWARF version when LTO'ing modules with different versions )

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-09 12:54:26 +00:00
yukang
ace6bb9869 Fix unwrap error in overflowing int literal 2025-02-09 20:39:43 +08:00
Chayim Refael Friedman
d4f7c7668f
Merge pull request #19120 from ahaoboy/patch-1
doc: error url
2025-02-09 11:18:39 +00:00
bors
1ff21350fd Auto merge of #136762 - workingjubilee:rollup-23fn0nl, r=workingjubilee
Rollup of 8 pull requests

Successful merges:

 - #136397 (Add a comment pointing to ICE-136223)
 - #136686 (Clean up `HashMap` and `HashSet` docs.)
 - #136706 (compiler: mostly-finish `rustc_abi` updates)
 - #136710 (Document `Sum::sum` returns additive identities for `[]`)
 - #136724 (Make `AsyncFnOnce`, `AsyncFnMut`, `AsyncFn` non-`#[fundamental]`)
 - #136727 (Have a break from review rotation)
 - #136730 (transmutability: fix ICE when passing wrong ADT to ASSUME)
 - #136736 (Small resolve refactor)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-09 10:08:04 +00:00
阿豪
82162a7ac8
doc: error url 2025-02-09 17:49:26 +08:00
Matthias Krüger
fb52da3808 crashes: more tests 2025-02-09 10:40:18 +01:00
Jubilee
45289b74fa
Rollup merge of #136736 - llogiq:small-resolve-refactor, r=jieyouxu
Small resolve refactor

I was looking into how resolve works in order to find a good way for clippy to shorten paths in messages and suggestions, and found a needless `.collect()` and a recursive function that could be written as a loop, also removed a panicky code path.
2025-02-08 20:41:24 -08:00
Jubilee
36c1809aa2
Rollup merge of #136730 - lukas-code:trans-ice, r=jswrenn
transmutability: fix ICE when passing wrong ADT to ASSUME

- Remove an incorrect assert that the `ASSUME` parameter has the type `Assume` and delay a bug instead.
- Since we checked the type of `ASSUME` is `Assume` (an ADT), its valtree must be a branch, so we can just unwrap it.

r? ```@jswrenn```
2025-02-08 20:41:23 -08:00
Jubilee
117ebaa8e6
Rollup merge of #136727 - chenyukang:yukang-fix-review-scope, r=workingjubilee
Have a break from review rotation

Be busy on the job recently.
2025-02-08 20:41:23 -08:00