35918 Commits

Author SHA1 Message Date
Shoyu Vanilla (Flint)
7a8db5545a
Merge pull request #20394 from rust-lang/dependabot/npm_and_yarn/editors/code/tmp-0.2.4
Bump tmp from 0.2.3 to 0.2.4 in /editors/code
2025-08-07 04:40:34 +00:00
Shoyu Vanilla (Flint)
8c52d1114a
Merge pull request #20373 from Hmikihiro/generate_module_as_ast_instead_of_str
In handlers/extract_module.rs, generate ast::Module instead of String
2025-08-07 04:38:58 +00:00
The rustc-josh-sync Cronjob Bot
3d1ff6363b Merge ref '6bcdcc73bd11' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: 6bcdcc73bd11568fd85f5a38b58e1eda054ad1cd
Filtered ref: 6cc4ce79e1f8dc0ec5a2e18049b9c1a51dee3221

This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-07 04:18:21 +00:00
bors
21dcab325c Auto merge of #144509 - cuviper:relnotes-1.89.0, r=BoxyUwU
Add release notes for 1.89.0

r? `@BoxyUwU`
cc `@rust-lang/release`
`@rustbot` ping relnotes-interest-group
2025-08-06 19:28:30 +00:00
Hmikihiro
fcd4010b03 In extract_module.rs, generate ast::Module instead of String 2025-08-07 02:29:59 +09:00
dependabot[bot]
77c9f5cb87
Bump tmp from 0.2.3 to 0.2.4 in /editors/code
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.3 to 0.2.4.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.3...v0.2.4)

---
updated-dependencies:
- dependency-name: tmp
  dependency-version: 0.2.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-06 17:11:37 +00:00
Lukas Wirth
529d3b935d
Merge pull request #20393 from rust-lang/veykril/push-urpzrkwpkmxw
Fix non-lsp compliant `Response` definition
2025-08-06 16:12:58 +00:00
Lukas Wirth
fc9a89dd19 Fix non-lsp compliant Response definition 2025-08-06 18:01:44 +02:00
Lukas Wirth
23504e1675
Merge pull request #20392 from rust-lang/veykril/push-pxplxplxvvyy
Report the incorrect payload when failing to deserialize lsp messages
2025-08-06 15:42:24 +00:00
Lukas Wirth
ae8b69f33a Report the incorrect payload when failing to deserialize lsp messages 2025-08-06 17:30:18 +02:00
Chayim Refael Friedman
4b49c7bf3d
Merge pull request #20354 from A4-Tacks/clean-lit-stmt-remove-dbg
Add remove literal dbg stmt for remove_dbg
2025-08-06 13:45:51 +00:00
A4-Tacks
75fd004dec
Add remove simple dbg stmt for remove_dbg
Remove only contain literals dbg statement

```rust
fn foo() {
    let n = 2;
    $0dbg!(3);
    dbg!(2.6);
    dbg!(1, 2.5);
    dbg!('x');
    dbg!(&n);
    dbg!(n);
    // needless comment
    dbg!("foo");$0
}
```
->
```rust
fn foo() {
    // needless comment
}
```
Old:
```rust
fn foo() {
    3;
    2.6;
    (1, 2.5);
    'x';
    &n;
    n;
    // needless comment
    "foo";
}
```
2025-08-06 21:33:10 +08:00
Shoyu Vanilla (Flint)
8241ec6b02
Merge pull request #20387 from ChayimFriedman2/rename-macro
fix: Do not remove the original token when descending into derives
2025-08-06 10:17:18 +00:00
bors
06962b2a4a Auto merge of #143684 - nikic:llvm-21, r=cuviper
Update to LLVM 21

Timeline: LLVM 21.1.0 is scheduled to release on Aug 26th. Rust 1.90 branches on Aug 1st and releases September 18.

Depends on:
 * [x] https://github.com/llvm/llvm-project/issues/147781
 * [x] https://github.com/llvm/llvm-project/issues/147935
 * [x] https://github.com/llvm/llvm-project/issues/139443
 * [x] https://github.com/llvm/llvm-project/pull/148207
 * [x] https://github.com/llvm/llvm-project/pull/148607
 * [x] https://github.com/llvm/llvm-project/pull/149046
 * [x] https://github.com/llvm/llvm-project/issues/149097
 * [x] https://github.com/rust-lang/rust/pull/144116

r? `@ghost`
2025-08-06 04:36:54 +00:00
Chayim Refael Friedman
75436532df
Merge pull request #20384 from vxpm/fix-external-docs
fix external docs for exported macros
2025-08-05 21:21:24 +00:00
vinícius x
d399beca79 fix external docs for exported macros
add test
2025-08-05 18:09:10 -03:00
bors
f06a604c98 Auto merge of #144863 - cjgillot:live-or-dead, r=Urgau
Simplify dead code lint

This PR scratches a few itches I had when looking at that code.

The perf improvement comes from keeping the `scanned` set through several marking phases. This pretty much divides by 2 the number of HIR traversals.
2025-08-05 18:10:21 +00:00
Chayim Refael Friedman
bd08e2e480
Merge pull request #20381 from A4-Tacks/fix-assign-sug
Add assignment type analysis for ide-completion
2025-08-05 15:17:49 +00:00
A4-Tacks
bfbeddf32e
Change prev whitespace to prev trivia 2025-08-05 20:54:38 +08:00
bors
b9a80daac2 Auto merge of #144303 - Kobzol:bootstrap-tool-cleanup, r=jieyouxu
Consolidate staging for `rustc_private` tools

This PR continues bootstrap refactoring, this time by consolidating staging for `Mode::ToolRustc` tools. This refactoring was in the critical path of refactoring `test`/`dist`/`clippy`/`doc` steps, and getting rid of the rmeta/rlib sysroot copy, because tools are pervasive and they are being used for a lot of things in bootstrap.

The main idea is to explicitly model the fact that a stage N `Mode::ToolRustc` tool always works with two different compilers:
- Stage N-1 rustc (`build_compiler`) builds stage N rustc (`target_compiler`)
- Rlib artifacts from stage N rustc are copied to the sysroot of stage N-1 rustc
- Stage N-1 rustc builds the (stage N) tool itself, the tool links to the rlib artifacts of the stage N rustc

Before, the code often used `compiler`, which meant sometimes the build compiler, sometimes the target compiler, and sometimes neither (looking at you, `download-rustc`). This is especially annoying when you get to a situation where you have an install step that invokes a dist step that invokes a tool build step, where *some* compiler is being propagated through, without it being clear what does that compiler represent. This refactoring hopefully makes that clearer and more explicit. It also gets rid of a few `builder.ensure(Rustc(...))` calls within bootstrap, which is always nice.

`Rustdoc` needs to be handled a bit specially, because it acts as a compiler itself, I documented that in the changes.

It wasn't practical to do these refactorings in multiple PRs, so I did it all in one PR. The meat of the change is 9ee6d1c1ed112c3dcfb5684b33772b136df0dca3.

I tested manually that `x build rustdoc` and `x build miri` still works even with `download-rustc`, although I cannot promise any extra support for `download-rustc`, IMO we will just have to reimplement it from scratch in a different way.

As usually, I did some drive-by refactorings to bootstrap, trying to document and clarify things, add more step metadata and tests.

Since these changes broke Cargo, which was incorrectly using `Mode::ToolRustc`, I also changed cargo to `ToolTarget` in this PR.

Best reviewed commit-by-commit (note that I renamed `link_compiler` to `target_compiler`, in accordance to the rest of bootstrap, in the last commit).

r? `@jieyouxu`

try-job: x86_64-gnu-aux
try-job: x86_64-msvc-ext1
2025-08-05 11:34:14 +00:00
Shoyu Vanilla (Flint)
2e283c1106
Merge pull request #20385 from Hmikihiro/migrate_expand_glob_import
Migrate `expand_glob_import` assist to use `SyntaxEditor`
2025-08-05 09:47:09 +00:00
Shoyu Vanilla (Flint)
6600a1a18b
Merge pull request #20383 from Hmikihiro/remove_ted_from_replace_named_generic_with_impl
remove `ted` from replace_named_generic_with_impl.rs
2025-08-05 09:43:32 +00:00
Shoyu Vanilla (Flint)
e968dd17bf
Merge pull request #20380 from Hmikihiro/add_attr_arg
remove `add_attr()` from edit_in_place.rs because it use `ted`.
2025-08-05 09:37:25 +00:00
Lukas Wirth
135f94a02b
Merge pull request #20389 from Veykril/push-ssyssvnrywvy
Slim down compile time artifact progress reports
2025-08-05 08:57:17 +00:00
Lukas Wirth
34ce0b5063 Slim down compile time artifact progress reports 2025-08-05 10:45:54 +02:00
bors
6e3ab74c1a Auto merge of #144934 - samueltardieu:rollup-25jvb9g, r=samueltardieu
Rollup of 17 pull requests

Successful merges:

 - rust-lang/rust#144467 (rustdoc template font links only emit `crossorigin` when needed)
 - rust-lang/rust#144548 (Rehome 21 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`)
 - rust-lang/rust#144741 (fix: Error on illegal `[const]`s inside blocks within legal positions)
 - rust-lang/rust#144776 (`Printer` cleanups)
 - rust-lang/rust#144779 (Implement debugging output of the bootstrap Step graph into a DOT file)
 - rust-lang/rust#144813 (Add a tidy check to prevent adding UI tests directly under `tests/ui/`)
 - rust-lang/rust#144817 (Properly reject tail calls to `&FnPtr` or `&FnDef`)
 - rust-lang/rust#144852 (Rename `rust_panic_without_hook` to `resume_unwind` )
 - rust-lang/rust#144866 (Remove `SHOULD_EMIT_LINTS` in favor of `should_emit`)
 - rust-lang/rust#144867 (Use `as_array` in PartialEq for arrays)
 - rust-lang/rust#144872 (Document Poisoning in `LazyCell` and `LazyLock`)
 - rust-lang/rust#144877 (coverage: Various small cleanups)
 - rust-lang/rust#144887 (`rust-analyzer` subtree update)
 - rust-lang/rust#144890 (Add `InterpCx::project_fields`)
 - rust-lang/rust#144894 (Delete `tests/ui/threads-sendsync/tcp-stress.rs`)
 - rust-lang/rust#144905 (rustc-dev-guide subtree update)
 - rust-lang/rust#144920 (Dont print arg span in MIR dump for tail call)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-08-05 01:53:59 +00:00
Samuel Tardieu
7dc88a777d
Rollup merge of #144920 - compiler-errors:span-arg, r=lqd
Dont print arg span in MIR dump for tail call

r? WaffleLapkin

This makes the MIR dump for tail call terminators consistent w/ regular calls.
2025-08-05 03:51:42 +02:00
Samuel Tardieu
577a85f351
Rollup merge of #144905 - tshepang:rdg-sync, r=jieyouxu
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to 1263fc2367.

Created using https://github.com/rust-lang/josh-sync.

r? ``@ghost``
2025-08-05 03:51:41 +02:00
Samuel Tardieu
d8756d850a
Rollup merge of #144894 - jieyouxu:chop-thread-cnt, r=ChrisDenton
Delete `tests/ui/threads-sendsync/tcp-stress.rs`

This stress test was originally introduced in 65cca4bd3fa0abe1000662014b3e3ea1420728f5 to detect a UAF in `libuv` (see rust-lang/rust#12823), but we no longer use `libuv`, so remove this test as it no longer serves its original purpose, and is causing flaky timeout failures.

Closes rust-lang/rust#144878 (by removing the test).

r? libs
2025-08-05 03:51:41 +02:00
Samuel Tardieu
8274e1ac2b
Rollup merge of #144890 - WaffleLapkin:project_fields, r=lcnr
Add `InterpCx::project_fields`

I was hoping for a much bigger improvement and this is lukewarm at best ^^'

Still, I think this makes sense.
2025-08-05 03:51:40 +02:00
Samuel Tardieu
cdf09237b4
Rollup merge of #144887 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to 8d75311400.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-08-05 03:51:40 +02:00
Samuel Tardieu
6fbc490c3a
Rollup merge of #144548 - Oneirical:uncountable-integer-2, r=jieyouxu
Rehome 21 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`

rust-lang/rust#143902 divided into smaller, easier to review chunks.

Part of rust-lang/rust#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that ``@Kivooeo`` was using.

r? ``@jieyouxu``
2025-08-05 03:51:33 +02:00
Chayim Refael Friedman
ea140ef0a8 Do not remove the original token when descending into derives
This caused rename to remove both, because it couldn't rename the derive-expanded one.

I spent some time trying to create a test for this, before giving up. But I checked manually that this works.
2025-08-05 01:04:21 +03:00
Chayim Refael Friedman
47845d6097 Allow renaming when there are multiple definitions (due to macros) even when some cannot rename 2025-08-05 00:10:21 +03:00
Hmikihiro
0e456af6a1 Migrate expand_glob_import assist to use SyntaxEditor 2025-08-05 01:16:57 +09:00
Hmikihiro
d2588a723d remove ted from replace_named_generic_with_impl.rs 2025-08-05 00:51:50 +09:00
Laurențiu Nicola
978393bae8
Merge pull request #20378 from skewb1k/chore/folding_ranges-perms
chore: fix crates/ide/src/folding_ranges.rs file perms
2025-08-04 15:15:27 +00:00
Shoyu Vanilla (Flint)
4c8fb89a36
Merge pull request #20382 from ChayimFriedman2/goto-def-from-macro
fix: Correctly goto `From` impl when on `into()` even when the call is inside a macro
2025-08-04 15:10:06 +00:00
A4-Tacks
5704431823
Add if..else completions in LetStmt and ArgList
Example
===
```rust
let x = $0;
```

Old completions:

```rust
let x = if $1 {
    $0
};
```

This PR current completions:

```rust
let x = if $1 {
    $2
} else {
    $0
};
```
2025-08-04 22:47:43 +08:00
Chayim Refael Friedman
1a6f7c2dcf Correctly goto From impl when on into() even when the call is inside a macro
Descend into macros first.
2025-08-04 17:41:00 +03:00
Hmikihiro
c57a42acf3 remvoe add_attr edit_in_place.rs because it use ted. 2025-08-04 21:52:49 +09:00
skewb1k
865b8802e6 chore: fix crates/ide/src/folding_ranges.rs file perms
755 -> 644
2025-08-04 14:19:31 +03:00
Nurzhan Sakén
e3d849467e Remove strict_overflow_ops lint 2025-08-04 04:13:10 +04:00
A4-Tacks
22d6136462
Add assignment type analysis for ide-completion 2025-08-04 01:59:03 +08:00
Lukas Wirth
8d75311400
Merge pull request #20372 from Hmikihiro/remove_unused_fn_from_edit_in_place
Remove unused functions from edit_in_place.rs
2025-08-04
2025-08-03 10:59:40 +00:00
Hmikihiro
1fea875fb1 Remove unused functions from edit_in_place 2025-08-03 19:40:54 +09:00
Lukas Wirth
531a02c824
Merge pull request #20371 from Hmikihiro/migrate_generate_trait_from_impl
Migrate `generate_trait_from_impl` assist to use `SyntaxEditor`
2025-08-03 07:23:07 +00:00
Hmikihiro
24f7f739d7 Migrate generate_trait_from_impl assist to use SyntaxEditor 2025-08-03 16:12:08 +09:00
Lukas Wirth
99526ef6ef
Merge pull request #20368 from Hmikihiro/migrate_delegate_methods
Migrate `generate_delegate_methods` assist to use `SyntaxEditor`
2025-08-03 06:37:22 +00:00
Lukas Wirth
22ec3e51a6
Merge pull request #20364 from Hmikihiro/migrate_convert_from_to_tryfrom
Migrate `convert_from_to_tryfrom` assist to use `SyntaxEditor`
2025-08-03 06:36:15 +00:00