Commit Graph

300570 Commits

Author SHA1 Message Date
Oli Scherer
84eeca2e2f Make some "safe" llvm ops actually sound 2025-07-10 07:27:41 +00:00
Trevor Gross
d50eb9fa5a Rollup merge of #143644 - Kobzol:stdarch-mention, r=Amanieu
Add triagebot stdarch mention ping

r? ````@Amanieu````
2025-07-10 03:23:57 -04:00
Trevor Gross
58ec9db538 Rollup merge of #143398 - lolbinarycat:tidy-extra-checks-auto, r=Kobzol
tidy: add support for `--extra-checks=auto:` feature

in preparation for rust-lang/rust#142924

also heavily refactored the parsing of the `--extra-checks` argument to warn about improper usage.

cc ```@GuillaumeGomez```

r? ```@Kobzol```
2025-07-10 03:23:57 -04:00
Trevor Gross
9af7bdafb7 Rollup merge of #143396 - rocurley:float_tests_refactor, r=tgross35
Move NaN tests to floats/mod.rs

This PR moves NaN tests to `floats/mod.rs`, as discussed in rust-lang/rust#141726. Since this is my first PR against Rust, I'm keeping it as small as possible, but I intend to work my way through the remaining tests and can do that work in this PR if that's preferable.

r? RalfJung
2025-07-10 03:23:56 -04:00
Trevor Gross
7ad90964dd Rollup merge of #143298 - Kivooeo:tf23, r=tgross35
`tests/ui`: A New Order [23/N]

> [!NOTE]
>
> Intermediate commits are intended to help review, but will be squashed prior to merge.

Some `tests/ui/` housekeeping, to trim down number of tests directly under `tests/ui/`. Part of rust-lang/rust#133895.

r? ``@tgross35``
2025-07-10 03:23:55 -04:00
Trevor Gross
a2fe1bcf70 Rollup merge of #143270 - TimNN:fix-enum-match, r=nikic
tests/codegen/enum/enum-match.rs: accept negative range attribute

The test current fails when `rustc` is built with HEAD LLVM: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/38097/steps/canvas?sid=0197c492-5661-4c42-8ae7-3d789e85c6ca

I suspect the change was caused by 545cdca488

``@rustbot`` label llvm-main
2025-07-10 03:23:55 -04:00
Trevor Gross
ebd3940454 Rollup merge of #143265 - scottmcm:mention-as-chunks, r=ibraheemdev
Mention as_chunks in the docs for chunks

and `as_rchunks_mut` from `rchunks_exact_mut`, and such.

As suggested in https://github.com/rust-lang/rust/issues/76354#issuecomment-3015376438 (but does not close that issue).
2025-07-10 03:23:54 -04:00
Trevor Gross
6bcc39c7fe Rollup merge of #143011 - LorrensP-2158466:warn-ambiguity-into-error, r=petrochenkov
Make lint `ambiguous_glob_imports` deny-by-default and report-in-deps

This pr aims to finish the second part of rust-lang/rust#114095. It converts the `ambiguous_glob_imports` lint from a warning to an error.

Currently, only the lint definition and the related tests are changed, a crater run should provide us with information on whether we should go for this.
2025-07-10 03:23:53 -04:00
Trevor Gross
643efdaa82 Rollup merge of #142950 - tgross35:metavariable-expr-rework, r=petrochenkov
mbe: Rework diagnostics for metavariable expressions

Make the diagnostics for metavariable expressions more user-friendly. This mostly addresses syntactic errors; I will be following up with improvements to `concat(..)`.
2025-07-10 03:23:53 -04:00
Trevor Gross
73d3adc67b Rollup merge of #141996 - Daniel-Aaron-Bloom:dollar_crate, r=petrochenkov
Fix `proc_macro::Ident`'s handling of `$crate`

This PR is addresses a few minor bugs, all relating to `proc_macro::Ident`'s support for `$crate`. `Ident` currently supports `$crate` (as can be seen in the `mixed-site-span` test), but:
* `proc_macro::Symbol::can_be_raw` is out of sync with `rustc_span::Symbol::can_be_raw`
  * former doesn't cover `$crate` while the latter does cover `kw::DollarCrate`
* `Ident::new` rejects `$crate`
  * This conflicts with the [reference definition](https://doc.rust-lang.org/nightly/reference/macros-by-example.html#r-macro.decl.meta.specifier) of `ident` which includes `$crate`.
  * This also conflicts with the documentation on [`Display for Ident`](https://doc.rust-lang.org/proc_macro/struct.Ident.html#impl-Display-for-Ident) which says the output "should be losslessly convertible back into the same identifier".

This PR fixes the above issues and extends the `mixed-site-span` test to exercise these fixed code paths, as well as validating the different possible spans resolve `$crate`  as expected (for both the new and old `$crate` construction code paths).
2025-07-10 03:23:52 -04:00
bors
cf3fb768db Auto merge of #143696 - oli-obk:constable-type-id2, r=RalfJung
Add opaque TypeId handles for CTFE

Reopen of https://github.com/rust-lang/rust/pull/142789#issuecomment-3053155043 after some bors insta-merge chaos

r? `@RalfJung`
2025-07-10 07:04:03 +00:00
Ralf Jung
317f59dfeb Merge pull request #4458 from rust-lang/rustup-2025-07-10
Automatic Rustup
2025-07-10 06:57:45 +00:00
Ralf Jung
17b240e04f silence clippy 2025-07-10 08:33:05 +02:00
nora
1ef00724e6 Merge pull request #2499 from rust-lang/tshepang-patch-2
distcheck has only one possible invocation
2025-07-10 08:28:54 +02:00
Shoyu Vanilla (Flint)
7625ed9394 Merge pull request #20210 from ChayimFriedman2/naked-asm-safe
fix: Inline asm fixes
2025-07-10 06:28:49 +00:00
nora
7c76abc888 Merge pull request #2500 from rust-lang/tshepang-patch-3
do not invent a name
2025-07-10 08:28:07 +02:00
nora
1a6e543f6c Merge pull request #2498 from rust-lang/tshepang-patch-1
add missing word
2025-07-10 08:27:45 +02:00
Jakub Beránek
3e675f4c50 Fix --skip-std-check-if-no-download-rustc
Since https://github.com/rust-lang/rust/pull/143048, we now explicitly set the build compiler for `check::Std`, which caused it to be built before we checked `--skip-std-check-if-no-download-rustc`. So I moved the check earlier to `make_run`, which resolves it.

I also added a regression test for this. Sadly we can't really test for the positive case easily (when download-ci-rustc is enabled), but we can test the negative cases, where it is disabled.
2025-07-10 08:20:22 +02:00
Jieyou Xu
3f4f23af61 Use is_windows_msvc instead of is_msvc in run-make tests 2025-07-10 13:55:04 +08:00
Jieyou Xu
87a41210d4 Only provide is_windows_msvc to gate on windows-msvc
And not both `is_windows_msvc` and `is_msvc`.
2025-07-10 13:54:43 +08:00
yukang
4dc954f882 remove unnecessary parens in rust-analyzer 2025-07-10 13:50:02 +08:00
Laurențiu Nicola
2452863acf Merge pull request #20221 from lnicola/assist-let-chain
minor: Revert "remove `if-let` chains"
2025-07-10 05:37:26 +00:00
Scott McMurray
58d7c2d5a7 Make UB transmutes really UB in LLVM
Ralf suggested in <https://github.com/rust-lang/rust/pull/143410#discussion_r2184928123> that UB transmutes shouldn't be trapping, which happened for the one path that PR was changing, but there's another path as well, so this PR changes that other path to match.
2025-07-09 22:30:15 -07:00
Laurențiu Nicola
9068133f2e Revert "remove if-let chains"
This reverts commit fcc81a38b3ed55447735f71e8d374fcb36c22f24.
2025-07-10 08:24:53 +03:00
The Miri Cronjob Bot
5e940f5810 fmt 2025-07-10 05:06:47 +00:00
The Miri Cronjob Bot
1f721c651e Merge from rustc 2025-07-10 05:05:40 +00:00
The Miri Cronjob Bot
e726c643e8 Preparing for merge from rustc 2025-07-10 04:58:14 +00:00
Shoyu Vanilla (Flint)
6ae9db7d64 Merge pull request #20212 from ChayimFriedman2/dyn-hint
fix: Fixes for `dyn` inlay hint
2025-07-10 04:57:57 +00:00
Shoyu Vanilla (Flint)
80f50227a6 Merge pull request #20218 from Hmikihiro/migrate_convert_match_to_let_else
Migrate `convert_match_to_let_else` assist to use `SyntaxEditor`
2025-07-10 04:32:40 +00:00
Jubilee Young
04bb68ac86 compiler: recomment needs_fn_once_adapter_shim
This requires digging up ffee9566bb
and reading the comments there to understand that the callee in
resolve_closure previously directly handled a function pointer value.
2025-07-09 20:53:23 -07:00
LevitatingBusinessMan (Rein Fernhout)
e0f76871ed rust: library: Add setsid method to CommandExt trait
Add a setsid method to the CommandExt trait so that callers can create
a process in a new session and process group whilst still using the
POSIX spawn fast path.

Co-Authored-By: Harvey Hunt <harveyhunt@fb.com>
2025-07-10 05:26:58 +02:00
Roger Curley
bc2001f158 Refactor nan tests 2025-07-09 23:24:47 -04:00
Hayashi Mikihiro
b273929156 Migrate convert_match_to_let_else assist to use SyntaxEditor
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-10 11:22:32 +09:00
Chayim Refael Friedman
c2fad05856 Put the expression stuff in the expression store behind an Option<Box>
And leave only the type stuff without it.

This is because most expression stores don't have anything but types (e.g. generics, fields, signatures) so this saves a lot of memory.

This saves 58mb on `analysis-stats .`.
2025-07-10 05:18:43 +03:00
bors
32cd911471 Auto merge of #143703 - dpaoliello:llvmupate, r=dianqk
Update LLVM submodule

Picks up <https://github.com/rust-lang/llvm-project/pull/183>

r? `@nikic`
2025-07-10 01:45:01 +00:00
yukang
0a64bfd685 Remove uncessary parens in closure body with unused lint 2025-07-10 09:25:56 +08:00
yukang
93db9e7ee0 Remove uncessary parens in closure body with unused lint 2025-07-10 09:25:56 +08:00
Trevor Gross
87e981996f mbe: Refactor the diagnostic for unrecognized metavariable expressions
Change to a structural diagnostic, update the valid list, and move the
valid list to a note.
2025-07-09 21:11:09 -04:00
Trevor Gross
e7ef31d651 mbe: Refactor diagnostics for invalid metavar expression syntax
Give a more user-friendly diagnostic about the following:

* Trailing tokens within braces, e.g. `${foo() extra}`
* Missing parentheses, e.g. `${foo}`
* Incorrect number of arguments, with a hint about correct usage.
2025-07-09 21:11:09 -04:00
Predrag Gruevski
27fb02c947 Add rustdoc JSON tests for #[doc(hidden)] handling of items. 2025-07-10 00:19:03 +00:00
bors
607fbd8d3e Auto merge of #143405 - tgross35:update-builtins, r=tgross35
Update the `compiler-builtins` subtree

Update the Josh subtree to https://github.com/rust-lang/compiler-builtins/commit/8aba4c899ee8.

r? `@ghost`
2025-07-09 22:42:11 +00:00
llogiq
49ca220ca0 Fix multiple problems in #15063 (#15070)
Closes rust-lang/rust-clippy#15063

----

changelog: [`op_ref`]: fix wrongly showed macro definition in
suggestions
changelog: [`needless_bool_assign`]: fix missing curlies when on else if
2025-07-09 21:55:36 +00:00
Ed Page
45a1e492b1 feat(lexer): Allow including frontmatter with 'tokenize' 2025-07-09 16:42:27 -05:00
LorrensP-2158466
e56678378b Use reference for MacroRulesScopeRef instead of Interned. 2025-07-09 23:24:51 +02:00
LorrensP-2158466
e9e31b1a93 MacroData in ResolverArenas + split macro_map into extern_macro_map and local_macro_map. 2025-07-09 23:24:36 +02:00
LorrensP-2158466
b286bc3141 fix aux-build failures 2025-07-09 23:18:32 +02:00
antoyo
8a9af5f7ef Merge pull request #733 from FractalFir/volatile_load_tmp
Inserted a local variable in volatile_load, to ensure reads don't move across blocks.
2025-07-09 17:11:30 -04:00
antoyo
35bdf8b4e2 Merge pull request #734 from FractalFir/remove_needless_attr
Skip needlessly setting the default visibility on functions
2025-07-09 17:10:02 -04:00
Timo
012e5f538b Fix manual_is_variant_and condition generation (#15206)
When comparing `x.map(func) == Some(bool_lit)`, the value of `bool_lit`
was ignored, despite the fact that its value should determine the value
of the proposed expression.

`func` can be either a closure or a path. For the latter, η-expansion
will be used if needed to invert the result of the function call.

changelog: [`manual_is_variant_and`]: fix inverted suggestions that
could lead to code with different semantics

Fixes rust-lang/rust-clippy#15202

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_SUMMARY_START -->

### Summary Notes

-
[Beta-nomination](https://github.com/rust-lang/rust-clippy/pull/15206#issuecomment-3034006613)
by [samueltardieu](https://github.com/samueltardieu)

*Managed by `@rustbot`—see
[help](https://forge.rust-lang.org/triagebot/note.html) for details*

<!-- TRIAGEBOT_SUMMARY_END -->
<!-- TRIAGEBOT_END -->
2025-07-09 21:04:18 +00:00
Tshepang Mbambo
99fc05bb18 do not invent a name
Nowhere else is this called "Dist check"
2025-07-09 23:03:37 +02:00