Commit graph

298901 commits

Author SHA1 Message Date
sayantn
806848f01e Correct rustc version for the stabilization of runtime detection of VEX variants of avx512 2025-05-17 17:43:54 +00:00
GrantBirki
1bc8535e61
revert forward slash to backslash 2025-05-17 10:36:39 -07:00
bors
bf5a38d118 Auto merge of #141133 - matthiaskrgr:rollup-u8ndxyz, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #135808 (Implement Display for ``rustc_target::callconv::Conv``)
 - #137432 (Add as_ascii_unchecked() methods to char, u8, and str)
 - #139103 (deduplicate abort implementations)
 - #140917 (checktools.sh: fix bashism)
 - #141035 (turn lld warning on old gccs into info log)
 - #141118 (Enable rust-analyzer to go from query definition to the corresponding provider field)
 - #141121 (Only select true errors in `impossible_predicates`)
 - #141125 (check coroutines with `TypingMode::Borrowck` to avoid cyclic reasoning)
 - #141131 (Make some `match`es slightly more ergonomic in `librustdoc`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-17 16:28:16 +00:00
Jieyou Xu
2dddbd1ecb
rustc-dev-guide: fix Rust for Linux rust-lang/rust label 2025-05-17 23:51:50 +08:00
Jieyou Xu
65d381b0cc
triagebot: fix Rust for Linux ping group rust-lang/rust label 2025-05-17 23:51:40 +08:00
xizheyin
b3b2153c0b
Update triagebot.toml
Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com>
2025-05-17 22:26:42 +08:00
bohan
1adfdb42b9 Use crate:: prefix for root macro suggestions 2025-05-17 22:01:57 +08:00
Matthias Krüger
339a46cb72
Rollup merge of #141131 - yotamofek:pr/rustdoc/match-ergo, r=fmease
Make some `match`es slightly more ergonomic in `librustdoc`

Bunch of small cleanups I found while working on other stuff, mostly getting rid of superfluous `*`s and `ref [mut]`s in `match`es,
makes the code less sigil/keyword-heavy, and slightly improves readability IMHO.
Also flattens a few nested `match`es.
2025-05-17 15:45:23 +02:00
Matthias Krüger
909098728c
Rollup merge of #141125 - lcnr:coroutine_obligations_use_borrowck, r=compiler-errors
check coroutines with `TypingMode::Borrowck` to avoid cyclic reasoning

MIR borrowck taints its output if an obligation fails. This could then cause `check_coroutine_obligations` to silence its error, causing us to not emit and actual error and ICE.

Fixes the ICE in https://github.com/rust-lang/trait-system-refactor-initiative/issues/199. It is unfortunately still a regression.

r? compiler-errors
2025-05-17 15:45:22 +02:00
Matthias Krüger
616650b6ca
Rollup merge of #141121 - compiler-errors:ambig-is-not-err, r=lcnr
Only select true errors in `impossible_predicates`

See description in test.

Fixes #141119

r? lcnr
2025-05-17 15:45:22 +02:00
Matthias Krüger
57a400d7c1
Rollup merge of #141118 - Veykril:lw-ymmtxytkrrqs, r=compiler-errors
Enable rust-analyzer to go from query definition to the corresponding provider field

r? `@compiler-errors`
2025-05-17 15:45:21 +02:00
Matthias Krüger
73ea8d7fdc
Rollup merge of #141035 - lqd:lld-warn, r=Mark-Simulacrum
turn lld warning on old gccs into info log

As discussed in #140964 and IRL, this PR switches the spammy warning shown unconditionally when an old gcc doesn't support `-fuse-ld=lld` and we retry linking without it, to an info debug log so we don't lose it.

r? `@Mark-Simulacrum`

Fixes #140964
2025-05-17 15:45:21 +02:00
Matthias Krüger
f0b115015a
Rollup merge of #140917 - RalfJung:checktools, r=WaffleLapkin
checktools.sh: fix bashism

Follow-up to https://github.com/rust-lang/rust/pull/140903. Turns out `tests/{pass,panic}` only properly expands in bash, not in dash. :/

r? `@WaffleLapkin`
2025-05-17 15:45:20 +02:00
Matthias Krüger
b9839ab329
Rollup merge of #139103 - joboet:abort_dedup, r=tgross35
deduplicate abort implementations

Currently, the code for process aborts is duplicated across `panic_abort` and `std`. This PR uses `#[rustc_std_internal_symbol]` to make the `std` implementation available to `panic_abort` via the linker, thereby deduplicating the code.
2025-05-17 15:45:20 +02:00
Matthias Krüger
eb01ba0b57
Rollup merge of #137432 - djscythe:char_u8_str_as_ascii_unchecked, r=scottmcm
Add as_ascii_unchecked() methods to char, u8, and str

This PR adds the `as_ascii_unchecked()` method to `char`, `u8`, and `str`, allowing users to convert these types to `ascii::Char`s (see #110998) in an `unsafe` context without first checking for validity. This method was already available for `[u8]`, so this PR makes the API more consistent across other types.
2025-05-17 15:45:19 +02:00
Matthias Krüger
836db3ccae
Rollup merge of #135808 - tiif:conv_display, r=workingjubilee
Implement Display for ``rustc_target::callconv::Conv``

Follow up of https://github.com/rust-lang/rust/pull/133103#discussion_r1885552854
2025-05-17 15:45:19 +02:00
Florian Diebold
c04873b02d Catch panics in inference in analysis-stats 2025-05-17 15:25:20 +02:00
Yotam Ofek
a4765c9fc2 Make some matches slightly more ergonomic in librustdoc 2025-05-17 13:23:44 +00:00
mejrs
f3bad7f4dd do away with _Self and TraitName and check generic params for rustc_on_unimplemented 2025-05-17 15:15:53 +02:00
mejrs
9ffd0bf75a do away with _Self and TraitName and check generic params for rustc_on_unimplemented 2025-05-17 15:15:53 +02:00
bors
2c12b4a690 Auto merge of #141116 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2025-05-17 13:12:22 +00:00
klensy
40940e1294 bootstrap: bump windows too 2025-05-17 15:31:02 +03:00
lcnr
667504b176 check coroutines with TypingMode::Borrowck to avoid cyclic reasoning
MIR borrowck taints its output if an obligation fails. This could then cause
`check_coroutine_obligations` to silence its error, causing us to not emit
and actual error and ICE.
2025-05-17 12:28:21 +00:00
klensy
9cacafdd1a compiler & tools: bump windows crate to dedupe versions 2025-05-17 15:26:38 +03:00
Ralf Jung
bd9f1fd273 exlicitly pass -Zdoctest-xcompile to avoid cargo version behavior differences 2025-05-17 14:22:44 +02:00
Michael Goulet
9578b59eac Only select true errors in impossible_predicates 2025-05-17 12:09:15 +00:00
mejrs
c9b6ccc11c Switch library rustc_unimplemented to use Self and This 2025-05-17 12:50:37 +02:00
Lukas Wirth
1c9f20f24c Enable rust-analyzer to go from query definition to the corresponding provider field 2025-05-17 12:45:32 +02:00
Timo
da7b678992
empty_struct_with_brackets: do not lint code coming from macro expansion (#14623)
Do not attempt to fetch a snippet from expansion. Without this change,
the inside of macros could[*] be shown as the source of the problem.

[*] Due to the way the source code is processed and reparsed in this
macro, the declarative macro has to be located outside the current
source file for the bug to appear. Otherwise, the macro call itself will
be (mis)identified as a potential `struct` field definition and the lint
will not trigger.

changelog: [`empty_struct_with_brackets`]: do not lint code coming from
macro expansion
2025-05-17 10:43:54 +00:00
Timo
daeb6a1d18
Misc changes (#14702)
This mainly fixes `with_leading_whitespace` not always adding the
whitespace it can.

changelog: None
2025-05-17 10:40:21 +00:00
klensy
40e3b804e5 opt-dist: fix deprecated BOLT -icf=1 option 2025-05-17 13:18:46 +03:00
Samuel Tardieu
9ebfb84fe0
Refactor and speed up cargo dev fmt (#14638)
Based on rust-lang/rust-clippy#14616

`cargo dev fmt` should now run almost instantly rather than taking a few
seconds.

changelog: None
2025-05-17 10:16:07 +00:00
bors
a43b8d1d2b Auto merge of #141113 - matthiaskrgr:rollup-k7izuh8, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #140208 (Make well-formedness predicates no longer coinductive)
 - #140957 (Add `#[must_use]` to Array::map)
 - #141031 (Async drop fix for dropee from another crate (#140858))
 - #141036 (ci: split the dist-ohos job)
 - #141051 (Remove some unnecessary erases)
 - #141056 (Lowercase git url for rust-lang/enzyme.git)
 - #141059 (HIR: explain in comment why `ExprKind::If` "then" is an `Expr`)
 - #141070 (Do not emit help when shorthand from macro when suggest `?` or `expect`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-17 10:13:08 +00:00
Jason Newcomb
232be55859 clippy_dev: refactor rustfmt calls 2025-05-17 06:11:19 -04:00
sayantn
98c4ba9783 Stabilize runtime detection of VEX variants of avx512 2025-05-17 09:48:33 +00:00
Ralf Jung
0a28db2d5b
Merge pull request #4324 from RalfJung/rustup
Rustup
2025-05-17 09:25:36 +00:00
Ralf Jung
ace4c6e015 fix for doctest-xcompile stabilization 2025-05-17 11:00:40 +02:00
Matthias Krüger
14f3ef997f
Rollup merge of #141070 - xizheyin:issue-140659, r=chenyukang
Do not emit help when shorthand from macro when suggest `?` or `expect`

Fixes #140659

I didn't fully minimize the original bug, but I found a similar test case, and they have perhaps the same root cause. For the bug mentioned in #140659 , I also tested it locally and passed it.

Jieyou has worked on this part before, maybe r? `@jieyouxu`
2025-05-17 10:33:12 +02:00
Matthias Krüger
59ad0cbd04
Rollup merge of #141059 - samueltardieu:push-trvpulpskwwp, r=compiler-errors
HIR: explain in comment why `ExprKind::If` "then" is an `Expr`

One could be tempted to replace the "then" `hir::Expr` with kind `hir::ExprKind::Block` by a `hir::Block`. Explain why this would not be a good idea.

I've been there.

r? ``@compiler-errors``
2025-05-17 10:33:11 +02:00
Matthias Krüger
4c52b5d17a
Rollup merge of #141056 - erickt:enzyme, r=Mark-Simulacrum
Lowercase git url for rust-lang/enzyme.git

On Fuchsia, we have an internal Gerrit mirrors of the rust repositories to avoid excess load on the public github servers. Since rust uses submodules, we need to then use git's `url.<base>.insteadOf` to point our checkouts at our mirrors.

We'd prefer to be able to point all repositories under `https://github.com/rust-lang` to
`https://rust.googlesource.com/rust-lang`, but unfortunately it seems that when Rust mirrored Enzyme, the repository name was lower cased to `https://github.com/rust-lang/enzyme`, but kept the name capitalized in the .gitmodules file. This didn't cause a problem for Github, which seems to handle repository names in a case insensitive way, Gerrit is case sensitive, so we can't use a glob rule. Instead we have to setup `insteadOf` rules for each repository.

This renames the URL to match the case of the repository name, which should avoid the issue.
2025-05-17 10:33:11 +02:00
Matthias Krüger
8e30998c18
Rollup merge of #141051 - compiler-errors:less-erase, r=nnethercote
Remove some unnecessary erases

Some nits I pulled out of https://github.com/rust-lang/rust/pull/140814.
2025-05-17 10:33:10 +02:00
Matthias Krüger
0031282c4d
Rollup merge of #141036 - marcoieni:split-dist-ohos, r=Kobzol
ci: split the dist-ohos job

try-job: `dist-ohos-*`
2025-05-17 10:33:10 +02:00
Matthias Krüger
04bc9d13ca
Rollup merge of #141031 - azhogin:azhogin/async-drop-dependency-fix, r=oli-obk
Async drop fix for dropee from another crate (#140858)

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

For `AsyncDestructor` impl def id was wrongly kept as a LocalDefId, which causes crash when dropee is declared in another crate.

Also, potential problem found:
when user crate drops type with async drop in dependency crate, and user crate doesn't enable `feature(async_drop)`, then sync drop version will be used.

Is it a problem? Do we need some notification about such situations?
2025-05-17 10:33:09 +02:00
Matthias Krüger
642cd65ab2
Rollup merge of #140957 - JulianKnodt:array_must_use, r=Mark-Simulacrum
Add `#[must_use]` to Array::map

The output of Array::map is intended to be an array of the same size, and does not modify the original in place nor is it intended for side-effects. Thus, under normal circumstances it should be consumed.

See [discussion](https://internals.rust-lang.org/t/array-map-annotate-with-must-use/22813/26).

Attaching to tracking issue #75243
2025-05-17 10:33:09 +02:00
Matthias Krüger
8c14588fbb
Rollup merge of #140208 - compiler-errors:wf-coinductive, r=lcnr
Make well-formedness predicates no longer coinductive

This PR makes well-formedness no longer coinductive. It was made coinductive in https://github.com/rust-lang/rust/pull/98542, but AFAICT this was only to fix UI tests since we stopped lowering `where Ty:` to an empty-region outlives predicate but to a WF predicate instead.

Arguably it should lower to something completely different, something like a "type mentioned no-op predicate", but well-formedness serves this purpose fine today, and since no code (according to crater) relies on this coinductive behavior, we'd like to avoid having to emulate it in the new solver.

Fixes #123456 (I didn't want to add a test since it seems low-value to have a ICE test for a fuzzer minimization that is basically garbage code.)

Fixes #109764 (not sure if this behavior is emulatable w/o coinductive WF?)

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/169

r? lcnr
2025-05-17 10:33:08 +02:00
Jason Newcomb
9d47e0c8ce clippy_dev: remove the need for markers when bumping the version 2025-05-17 04:27:39 -04:00
Ralf Jung
b99daba38e fix clippy lints 2025-05-17 10:07:30 +02:00
Ralf Jung
8f2da9b487 Merge from rustc 2025-05-17 09:53:02 +02:00
Ralf Jung
3a9ee90ded Preparing for merge from rustc 2025-05-17 09:52:27 +02:00
Tomasz Miąsko
3b7ca287a7 Describe lifetime of call argument temporaries passed indirectly 2025-05-17 09:49:03 +02:00