Commit graph

308340 commits

Author SHA1 Message Date
lcnr
b70a15f5f6 predefined opaques to method_autoderef_steps 2025-09-26 16:33:15 +02:00
lcnr
1acd65cd6d predefined opaques use List 2025-09-26 16:33:15 +02:00
Guillaume Gomez
a535c7be54 Ignore more failing ui tests for GCC backend 2025-09-26 15:33:48 +02:00
lcnr
4e44d58bbc rename search_graph::Delegate fns 2025-09-26 15:29:01 +02:00
lcnr
4a0c7cc730 fix cycle head usages tracking 2025-09-26 15:29:01 +02:00
A4-Tacks
3d25a36099
Fix .let completion not work for let-chain
Example
---
```rust
fn main() {
    let bar = Some(true);
    if true && bar.$0
}
```

**Before this PR**:

Cannot complete `.let`

**After this PR**:

```rust
fn main() {
    let bar = Some(true);
    if true && let Some($0) = bar
}
```
2025-09-26 21:20:04 +08:00
Guillaume Gomez
62c457bb02 Mention tyalias in intra-doc link rustdoc book chapter 2025-09-26 15:07:12 +02:00
Guillaume Gomez
dba45cde68 Add tests for new tyalias intra-doc link disambiguator 2025-09-26 15:07:12 +02:00
bors
a885811104 Auto merge of #146595 - Shourya742:make-cargo-test-work-for-self-test, r=Kobzol
Make cargo test work for  bootstrap self test

This PR enables the bootstrap self-test to run via cargo test. I have removed the detect_src_and_out test for now, but it will be reintroduced in a follow-up PR where all bootstrap tests will be migrated to use testCtx.

r? `@Kobzol`

try-job: aarch64-apple
2025-09-26 12:55:15 +00:00
Guillaume Gomez
7a2c173033 Add new tyalias intra-doc link disambiguator 2025-09-26 12:04:16 +02:00
Marijn Schouten
fc703ec5c8 fix doc comments to be more standard 2025-09-26 09:25:56 +00:00
Shoyu Vanilla (Flint)
7de38d36eb
Merge pull request #20748 from A4-Tacks/migrate-arith-op-prec
Migrate `replace_arith_op` assist to use `SyntaxEditor`
2025-09-26 09:05:59 +00:00
Shoyu Vanilla (Flint)
8d4c00def0
Merge pull request #20599 from A4-Tacks/bang-de-morgan
Add applicable on bang `!` for apply_demorgan
2025-09-26 08:58:07 +00:00
A4-Tacks
93a96bf29c
Migrate replace_arith_op assist to use SyntaxEditor 2025-09-26 16:54:47 +08:00
Yotam Ofek
a40032d9e3 Simplify notable traits map serialization 2025-09-26 11:42:52 +03:00
Yotam Ofek
82fecf0ee3 Cleanup notable_traits_decl 2025-09-26 11:42:52 +03:00
Yotam Ofek
78ff5ddad9 Remove usages of write_str from render_assoc_items_inner 2025-09-26 11:42:44 +03:00
Shoyu Vanilla (Flint)
a7df846d55
Merge pull request #20611 from A4-Tacks/replace-arith-op-prec
Fix precedence parenthesis for replace_arith_op
2025-09-26 08:30:46 +00:00
beepster4096
aa5a21450a ProjectionElem::Subtype -> CastKind::Subtype 2025-09-26 01:25:26 -07:00
Shoyu Vanilla (Flint)
eb0cacbd32
Merge pull request #20604 from A4-Tacks/cfg-attr-comp
Add cfg_attr predicate completion
2025-09-26 08:10:25 +00:00
Jason Newcomb
abdc61fb88
filter_next: check for filter().next_back() (#15748)
Closes: rust-lang/rust-clippy#15715

changelog: [`filter_next`]: suggest replacing `filter().next_back()`
with `rfind()` for `DoubleEndedIterator`
2025-09-26 08:02:18 +00:00
bors
5b9007bfc3 Auto merge of #147054 - matthiaskrgr:rollup-660g92w, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#146283 (Resolve: (Ref)Cell wrappers to deny mutation during spec resolution.)
 - rust-lang/rust#146453 (Add general arm-linux.md platform doc.)
 - rust-lang/rust#146991 (const_caller_location to use real Span instead of `DUMMY_SP`)
 - rust-lang/rust#146994 (Add `clippy::unconditional_recursion` to `./x clippy ci`)
 - rust-lang/rust#147038 (Rename verbosity functions in bootstrap)
 - rust-lang/rust#147047 (rustdoc: put the toolbar on the all item index)
 - rust-lang/rust#147049 (std: fix warning in VEXos stdio module)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-26 07:45:10 +00:00
Shoyu Vanilla (Flint)
f1e67f5418
Merge pull request #20729 from A4-Tacks/const-param-kwd
Add const parameter keyword completion
2025-09-26 07:00:52 +00:00
Shoyu Vanilla (Flint)
c491a330f3
Merge pull request #20731 from A4-Tacks/expand-rest-pat-in-tuple-slice-pat
Fix expand rest pattern in tuple and slice pattern
2025-09-26 06:54:30 +00:00
A4-Tacks
38284d10dc
Fix expand rest pattern in tuple and slice pattern
Assist: expand_tuple_rest_pattern

Fills fields by replacing rest pattern in tuple patterns.

Example
---
```
fn foo(bar: (char, i32, i32)) {
    let (ch, ..$0) = bar;
}
```
->
```
fn foo(bar: (char, i32, i32)) {
    let (ch, _1, _2) = bar;
}
```

---

Assist: expand_slice_rest_pattern

Fills fields by replacing rest pattern in slice patterns.

Example
---
```
fn foo(bar: [i32; 3]) {
    let [first, ..$0] = bar;
}
```
->
```
fn foo(bar: [i32; 3]) {
    let [first, _1, _2] = bar;
}
```
2025-09-26 14:44:05 +08:00
Shoyu Vanilla (Flint)
acd320f7b3
Merge pull request #20598 from A4-Tacks/let-chain-sup-conv-to-guarded-ret
Add let-chain support for convert_to_guarded_return
2025-09-26 06:42:10 +00:00
Fabian Grünbichler
68c0e97cc6 re-order normalizations in run-make linker-warning test
otherwise a buildroot containing `libpanic_abort` would be mangled before being
replaced by the build root placeholder value..

e.g., running `./x.py test --verbose tests/run-make/linker-warning` with rustc
checked out in ~/ext/rustc-libpanic_abort will result in (output slightly shortened):

```
running 1 tests
test [run-make] tests/run-make/linker-warning ... FAILED

failures:

---- [run-make] tests/run-make/linker-warning stdout ----

------rustc stdout------------------------------

------rustc stderr------------------------------

------------------------------------------

error: rmake recipe failed to complete
status: exit status: 101
command: cd "/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/test/run-make/linker-warning/rmake_out" && env -u RUSTFLAGS -u __RUSTC_DEBUG_ASSERTIONS_ENABLED -u __STD_DEBUG_ASSERTIONS_ENABLED AR="ar" BUILD_ROOT="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu" CC="cc" CC_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64" CXX="c++" CXX_DEFAULT_FLAGS="-ffunction-sections -fdata-sections -fPIC -m64" HOST_RUSTC_DYLIB_PATH="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/stage1/lib" LD_LIBRARY_PATH="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64-unknown-linux-gnu/lib" LD_LIB_PATH_ENVVAR="LD_LIBRARY_PATH" LLVM_BIN_DIR="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/ci-llvm/bin" LLVM_COMPONENTS="<...>" LLVM_FILECHECK="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/ci-llvm/bin/FileCheck" NODE="/usr/bin/node" PYTHON="/usr/bin/python3" RUSTC="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/stage1/bin/rustc" RUSTDOC="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/stage1/bin/rustdoc" SOURCE_ROOT="/home/user/ext/rustc-libpanic_abort" TARGET="x86_64-unknown-linux-gnu" TARGET_EXE_DYLIB_PATH="/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/user/ext/rustc-libpanic_abort/build/x86_64-unknown-linux-gnu/test/run-make/linker-warning/rmake"
stdout: none
--- stderr -------------------------------

thread 'main' panicked at /home/user/ext/rustc-libpanic_abort/tests/run-make/linker-warning/rmake.rs:74:14:
test failed: `short-error.txt` is different from `(linker error)`

--- short-error.txt
+++ (linker error)
@@ -1,6 +1,6 @@
 error: linking with `./fake-linker` failed: exit status: 1
   |
-  = note:  "./fake-linker" "-m64" "/symbols.o" "<2 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/build-root/test/run-make/linker-warning/rmake_out/{libfoo,libbar}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/build-root/test/run-make/linker-warning/rmake_out" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "main" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "run_make_error"
+  = note:  "./fake-linker" "-m64" "/symbols.o" "<2 object files omitted>" "-Wl,--as-needed" "-Wl,-Bstatic" "/home/user/ext/rustc-libpanic_unwind/build/x86_64-unknown-linux-gnu/test/run-make/linker-warning/rmake_out/{libfoo,libbar}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libstd-*,libpanic_unwind-*,libobject-*,libmemchr-*,libaddr2line-*,libgimli-*,libcfg_if-*,librustc_demangle-*,libstd_detect-*,libhashbrown-*,librustc_std_workspace_alloc-*,libminiz_oxide-*,libadler2-*,libunwind-*,liblibc-*,librustc_std_workspace_core-*,liballoc-*,libcore-*,libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-L" "/raw-dylibs" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/home/user/ext/rustc-libpanic_unwind/build/x86_64-unknown-linux-gnu/test/run-make/linker-warning/rmake_out" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "main" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "run_make_error"
   = note: some arguments are omitted. use `--verbose` to show all linker arguments
   = note: error: baz

[..]
```

without this fix.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2025-09-26 08:14:25 +02:00
Oli Scherer
7095a86b9d
Merge pull request #4604 from rust-lang/rustup-2025-09-26
Automatic Rustup
2025-09-26 05:45:39 +00:00
Shoyu Vanilla (Flint)
35f76dfcd9
Merge pull request #20736 from A4-Tacks/fix-invert-if-let-chain
Fix applicable on if-let-chain for invert_if
2025-09-26 05:36:52 +00:00
Shoyu Vanilla (Flint)
79b0a927b9
Merge pull request #20742 from A4-Tacks/unused-raw-var
Fix fixes for unused raw variables
2025-09-26 05:25:09 +00:00
The Miri Cronjob Bot
4aacd30c0f Merge ref 'b733736ea2' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: b733736ea2
Filtered ref: 62d76e7793dfad401d4a82041e6c587b4eef0854
Upstream diff: f6092f224d...b733736ea2

This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-26 05:01:29 +00:00
The Miri Cronjob Bot
7dfc6b2e27 Prepare for merging from rust-lang/rust
This updates the rust-version file to b733736ea2.
2025-09-26 04:53:29 +00:00
Matthias Krüger
87b8eca516
Rollup merge of #147049 - vexide:vex-std, r=workingjubilee
std: fix warning in VEXos stdio module

Fixes building `std` on the `armv7a-vex-v5` target due to an unnecessarily mutable argument in `Stdin`.

This was a stupid oversight on my part towards the end of rust-lang/rust#145973's review process. Missed a warning and had a bad bootstrap config that didn't tell me about it when testing changes.
2025-09-26 06:36:34 +02:00
Matthias Krüger
1285b164e1
Rollup merge of #147047 - notriddle:toolbar-index, r=GuillaumeGomez
rustdoc: put the toolbar on the all item index
2025-09-26 06:36:33 +02:00
Matthias Krüger
610a601f36
Rollup merge of #147038 - Kobzol:bootstrap-verbose-fn, r=jieyouxu
Rename verbosity functions in bootstrap

Just a small cleanup, these function names have been bothering me for a while. I realized that we can delete some of them outright, rather than just renaming them.

r? ``@jieyouxu``
2025-09-26 06:36:33 +02:00
Matthias Krüger
07d13a6469
Rollup merge of #146994 - cuviper:clippy-ci-recursion, r=Kobzol
Add `clippy::unconditional_recursion` to `./x clippy ci`

The clippy lint catches some things that rustc's equivalent builtin lint
does not, for example rust-lang/rust#146940:

    error: function cannot return without recursing
        --> library/std/src/path.rs:3428:5
         |
    3428 | /     fn eq(&self, other: &String) -> bool {
    3429 | |         self == &*other
    3430 | |     }
         | |_____^
         |
    note: recursive call site
        --> library/std/src/path.rs:3429:9
         |
    3429 |         self == &*other
         |         ^^^^^^^^^^^^^^^
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unconditional_recursion
         = note: requested on the command line with `-D clippy::unconditional-recursion`
2025-09-26 06:36:32 +02:00
Matthias Krüger
b184550f0e
Rollup merge of #146991 - cachebag:span-caller-location, r=RalfJung
const_caller_location to use real Span instead of `DUMMY_SP`

Clarifying usage of DUMMY_SP
2025-09-26 06:36:32 +02:00
Matthias Krüger
72fee890e2
Rollup merge of #146453 - thejpster:arm-linux-docs, r=petrochenkov
Add general arm-linux.md platform doc.

Adds a new page that covers all 32-bit Arm Linux systems. This means that we can reduce the amount of information required in the target specific pages to just the Tier level, the maintainer, and any specific details for that target.

I have no changed those pages yet, though. Let's start with this.
2025-09-26 06:36:31 +02:00
Matthias Krüger
82e9e54ef3
Rollup merge of #146283 - LorrensP-2158466:resolve-cm-cell, r=petrochenkov
Resolve: (Ref)Cell wrappers to deny mutation during spec resolution.

Introduces wrappers around `Cell` and `RefCell` that only allow mutation when we are not in speculative resolution. This is preparatory work for rust-lang/rust#145108.

It would allow us to make `ImportData` and `ModuleData` sync and send safe.

r? ``@petrochenkov``
2025-09-26 06:36:30 +02:00
bors
c56f950f23 Auto merge of #145882 - m-ou-se:format-args-extend-1-arg, r=petrochenkov
Extended temporary argument to format_args!() in all cases

Fixes https://github.com/rust-lang/rust/issues/145880 by removing the special case.
2025-09-26 04:34:09 +00:00
bors
40ace17fc3 Auto merge of #145882 - m-ou-se:format-args-extend-1-arg, r=petrochenkov
Extended temporary argument to format_args!() in all cases

Fixes https://github.com/rust-lang/rust/issues/145880 by removing the special case.
2025-09-26 04:34:09 +00:00
Jules Bertholet
5de617e71f
Rename ui test items 2025-09-25 23:57:59 -04:00
Camille Gillot
1a37374973 JumpThreading: Avoid computing dominators to identify loop headers. 2025-09-26 00:07:53 +00:00
bors
b733736ea2 Auto merge of #146919 - lcnr:yeet-fast-path, r=fee1-dead
remove incorrect fast path

Using `tcx.is_copy_modulo_regions` drops information from the current `typing_env`. Writing a regression test for this is really hard. We need to prove `Copy` of something that doesn't directly reference a coroutine or an opaque, but does so indirectly.

cc rust-lang/rust#146813.
2025-09-25 23:50:40 +00:00
Michael Howell
51ae86dec9 rustdoc-search: add test case for all/index.html search 2025-09-25 15:45:11 -07:00
Augie Fackler
7a9b6d94d4 PassWrapper: update for new PGOOptions args in LLVM 22
This changed in upstream change a5569b4bd7f8.

@rustbot label llvm-main
2025-09-25 18:24:16 -04:00
Michael Howell
9dce3e8556 rustdoc-search: add descriptive comment to space-saving hack 2025-09-25 15:16:16 -07:00
Tropical
0ede3fe48c std: fix warning in VEXos stdio module 2025-09-25 16:34:20 -05:00
Samuel Tardieu
24b0282344
inline clippy_utils::ptr into needless_pass_by_value (#15760)
While looking into
https://github.com/rust-lang/rust-clippy/issues/15569, I stumbled upon
`clippy_utils::ptr`.

This module was created in
https://github.com/rust-lang/rust-clippy/pull/2117, to share the logic
from `ptr_arg` with `needless_pass_by_value`. But then later,
https://github.com/rust-lang/rust-clippy/pull/8409 removed the use of
the logic from `ptr_arg`, which left `needless_pass_by_value` as the
only user of this module.

Still, I wanted to try to add docs to the module, but the two functions
looked all too specific, so I thought it'd be better to just move them
to `needless_pass_by_value`, in the hopes that whoever is looking at
that lint will hopefully have enough context to understand what those
functions are doing.

changelog: none
2025-09-25 21:21:24 +00:00
Michael Howell
8daad494b1 rustdoc: put the toolbar on the all item index 2025-09-25 14:19:22 -07:00