bit-aloo
776dfd7abe
remove make from move_bound
2026-03-06 15:32:33 +05:30
bit-aloo
52511b7cb6
remove make from generate_fn_type_alias_from_new
2026-03-06 15:32:33 +05:30
bit-aloo
01b8ebc91b
remove make from generate_default_from_new
2026-03-06 15:32:33 +05:30
bit-aloo
a5b96fc81d
remove make from convert_bool_to_enum
2026-03-06 15:32:33 +05:30
bit-aloo
6feab700fc
remove make from add_turbo_fish
2026-03-06 15:32:33 +05:30
bit-aloo
2aeb269257
remove make from extract_type_alias
2026-03-06 15:32:33 +05:30
Laurențiu Nicola
7e440b1d07
Tweak pre-release check for beta
2026-03-06 07:18:44 +02:00
Lukas Wirth
e8ee51ab9e
Merge pull request #21752 from ChayimFriedman2/question-mark-conversion
...
feat: When going to def on `?` on `Result` that goes through `From`, go to the `From` impl
2026-03-05 08:57:32 +00:00
The rustc-josh-sync Cronjob Bot
048bfabd85
Merge ref 'f8704be04fe1' from rust-lang/rust
...
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: rust-lang/rust@f8704be04f
Filtered ref: rust-lang/rust-analyzer@5ecd3ed8b0
Upstream diff: e7d90c695a...f8704be04f
This merge was created using https://github.com/rust-lang/josh-sync .
2026-03-05 04:37:29 +00:00
Shoyu Vanilla (Flint)
87f5363056
Merge pull request #21750 from ChayimFriedman2/method-res-typingmode
...
fix: Do not use PostAnalysis TypingMode for IDE method resolution
2026-03-05 02:30:02 +00:00
Chayim Refael Friedman
202fd31d0b
When going to def on ? on Result that goes through From, go to the From impl
...
It's more useful to users than going to `Try::branch()` impl from `Result`, which is in std.
2026-03-05 01:25:35 +02:00
Chayim Refael Friedman
398419b1e7
Do not use PostAnalysis TypingMode for IDE method resolution
...
As explained in the comments, PostAnalysis is good for most IDE things but not method resolution.
This fixes a bug which should not be impacted by this at all - return position impl trait in trait. It is currently lowered to an opaque, while it should be lowered to an anonymous associated type. But today when it is lowered as an opaque, this opaque of course has no definition and will normalize to an error, preventing method resolution on it from succeeding in some cases.
2026-03-04 22:06:36 +02:00
Jonathan Brouwer
403297d33a
Rollup merge of #152164 - mu001999-contrib:lint/unused_features, r=JonathanBrouwer
...
Lint unused features
*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152164 )*
Fixes rust-lang/rust#44232
Fixes rust-lang/rust#151752
---
This PR records used features through query side effect, then reports unsued features finally.
2026-03-04 19:30:36 +01:00
Shoyu Vanilla (Flint)
789ad51109
Merge pull request #21747 from ChayimFriedman2/never-upd-syn
...
fix: Allow never coercions in struct update syntax
2026-03-04 16:08:04 +00:00
Chayim Refael Friedman
1a6d91ea8f
Allow never coercions in struct update syntax
2026-03-04 17:57:39 +02:00
Lukas Wirth
e8b19c9a93
Merge pull request #21745 from ChayimFriedman2/assoc-type-fixup
...
fix: Fix a bug in associated type lowering
2026-03-04 13:39:33 +00:00
Chayim Refael Friedman
022f93973a
Merge pull request #21671 from A4-Tacks/postfix-tree-climbing
...
fix: offer block `.let` in ref-expr in match arm
2026-03-04 08:10:24 +00:00
Chayim Refael Friedman
bfa88ee8b2
Fix a bug in associated type lowering
...
When rewriting assoc type shorthand lowering (`TypeParam::AssocType`), I took into account that if two traits have the same assoc type, even if one is a supertrait of the other, it's an error. However it turns out that assoc type predicates (`Trait<AssocType = Foo>`) uses the same infrastructure, and there it's allowed to specify an ambiguous assoc type when it refers to a sub-trait. So make a distinction between ambiguous assoc type that comes from a supertrait and one that does not, and if it comes from a supertrait, keep the resolved assoc type for cases that need it.
2026-03-04 09:24:16 +02:00
Chayim Refael Friedman
09fe22e4d9
Merge pull request #21687 from A4-Tacks/destruct-self-param
...
feat: offer destructure_struct_binding on self param
2026-03-04 05:05:22 +00:00
Chayim Refael Friedman
eb8d10e0bf
Merge pull request #21719 from A4-Tacks/make-block-newline
...
fix: Improve newline for make `match`, `if`, `while` etc
2026-03-04 04:58:28 +00:00
Chayim Refael Friedman
86a5201c36
Merge pull request #21726 from Albab-Hasan/fix/next-solver-is-rust
...
Fix: align `is_rust()` with rustc by correcting constructor ABI in next solver
2026-03-04 04:55:46 +00:00
Chayim Refael Friedman
a105c172b9
Merge pull request #21728 from A4-Tacks/add-match-arms-descend-range
...
fix: Fix wrong descend range for add_missing_match_arms
2026-03-04 04:54:07 +00:00
mu001999
bcb0e2207a
Remove unused features in tools
2026-03-04 08:06:36 +08:00
Daniel Scherzer
7ff962b02a
Comments and docs: add missing periods to "ie."
...
"i.e." is short for the Latin "id est" and thus both letters should be followed
by periods.
2026-03-02 18:11:13 -08:00
The rustc-josh-sync Cronjob Bot
1940931c34
Format code
2026-03-02 04:38:42 +00:00
The rustc-josh-sync Cronjob Bot
2b1254680c
Merge ref 'e7d90c695a39' from rust-lang/rust
...
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: rust-lang/rust@e7d90c695a
Filtered ref: rust-lang/rust-analyzer@bf9b8b9d7c
Upstream diff: c78a29473a...e7d90c695a
This merge was created using https://github.com/rust-lang/josh-sync .
2026-03-02 04:38:36 +00:00
A4-Tacks
61c50dd9ca
fix: Fix wrong descend range for add_missing_match_arms
...
Example
---
```rust
macro_rules! m { ($expr:expr) => {$expr}}
enum Test {
A,
B,
C,
}
fn foo(t: Test) {
m!(match t {
Test::A => (),
$0});
}
```
**Before this PR**
Assist not applicable
**After this PR**
```rust
macro_rules! m { ($expr:expr) => {$expr}}
enum Test {
A,
B,
C,
}
fn foo(t: Test) {
m!(match t {
Test::A=>(),
Test::B => ${1:todo!()},
Test::C => ${2:todo!()},$0
});
}
```
2026-03-02 00:46:33 +08:00
Albab-Hasan
3a619aabe4
Fix: use FnAbi::Rust for tuple struct/enum constructors and align is_rust() with rustc
2026-03-01 17:09:21 +06:00
Chayim Refael Friedman
a96b6a9b88
Merge pull request #21654 from Albab-Hasan/fix/binop-rhs-never-coercion
...
fix: use `ExprIsRead::Yes` for rhs of binary operators
2026-02-28 20:25:33 +00:00
Albab-Hasan
ab44d8263e
fix: use compound assignment in binop_lhs_never_place_diverges test
2026-03-01 00:04:13 +06:00
Lukas Wirth
d5d00a364a
Merge pull request #21725 from Veykril/push-skvpqzkooolm
...
fix: Fix wrong confiditon in `Visibility::min`
2026-02-28 17:09:40 +00:00
Lukas Wirth
d85bc7ccf2
fix: Fix wrong confiditon in Visibility::min
2026-02-28 18:00:32 +01:00
Jonathan Brouwer
8698ce8d7e
Rollup merge of #153211 - lnicola:sync-from-ra, r=lnicola
...
`rust-analyzer` subtree update
Subtree update of `rust-analyzer` to fbc7b76b27 .
Created using https://github.com/rust-lang/josh-sync .
r? @ghost
2026-02-28 12:52:51 +01:00
Lukas Wirth
fbc7b76b27
Merge pull request #21669 from Shourya742/2026-02-18-add-span-parent
...
Implement Span::SpanParent for proc-macro-srv
2026-02-28 07:25:41 +00:00
A4-Tacks
fea31a6f8b
fix: Improve newline for make match, if, while etc
...
- Remove unused `ast::make::match_arm_with_guard`
Example
---
```rust
fn main() {
if true {
$0if true
&& false
{
foo()
}
}
}
```
**Before this PR**
```rust
fn main() {
if true {
match true
&& false {
true => foo(),
false => (),
}
}
}
```
**After this PR**
```rust
fn main() {
if true {
match true
&& false
{
true => foo(),
false => (),
}
}
}
```
2026-02-27 19:39:12 +08:00
SpiZeak
fa0e4ed012
fix: migrate to SyntaxEditor in generate_derive assist
2026-02-27 11:09:44 +01:00
Shoyu Vanilla (Flint)
8494a8b3b7
Merge pull request #21710 from SpiZeak/migrate-fix-visibility
...
Migrate fix_visibility assist to use SyntaxEditor
2026-02-27 07:55:59 +00:00
SpiZeak
dd8e886398
feat: migrate fix_visibility assist to SyntaxEditor
2026-02-27 08:19:56 +01:00
Laurențiu Nicola
ba09b3315e
Use -Zlockfile-path on every 1.95 nightly
2026-02-27 08:53:39 +02:00
Shoyu Vanilla (Flint)
df080dbbd5
Merge pull request #21706 from A4-Tacks/redundant-enum-variant-pat
...
fix: no complete enum variant qualifier in pat
2026-02-27 02:17:11 +00:00
Shoyu Vanilla (Flint)
d33510122b
Merge pull request #21698 from A4-Tacks/indent-iflet-with-match
...
fix: Fix scrutinee expr indent for replace_if_let_with_match
2026-02-27 02:12:58 +00:00
Shoyu Vanilla (Flint)
d3ea35e498
Merge pull request #21699 from Albab-Hasan/fix/ptr-cast-add-auto-trait-not-detected
...
fix: Detect E0804 when casting raw ptr-to-dyn adds auto traits
2026-02-27 02:11:49 +00:00
Lukas Wirth
56b59a8328
Merge pull request #21708 from lnicola/no-invalid-notification-panic
...
fix: Don't panic on invalid LSP notifications
2026-02-26 08:27:07 +00:00
Laurențiu Nicola
26186144e7
Don't panic on invalid notifications
2026-02-25 21:06:33 +02:00
mu001999
f91be08311
Remove redundant self usages
2026-02-25 22:51:53 +08:00
A4-Tacks
423c466df5
fix: no complete enum variant qualifier in pat
...
Example
---
```rust
enum Enum { TupleV(u32), RecordV { field: u32 }, UnitV }
use Enum::*;
fn func() {
if let $0 = unknown {}
}
```
**Before this PR**
```text
...
ev RecordV
ev TupleV
ev UnitV
bn RecordV {…} RecordV { field$1 }$0
bn TupleV(…) TupleV($1)$0
bn UnitV UnitV$0
kw mut
kw ref
```
**After this PR**
```text
...
bn RecordV {…} RecordV { field$1 }$0
bn TupleV(…) TupleV($1)$0
bn UnitV UnitV$0
kw mut
kw ref
```
2026-02-25 20:52:50 +08:00
Wilfred Hughes
57527228ad
internal: Skip rustfmt test if nightly toolchain is missing
...
Currently the rustfmt slow test fails if you don't have a nightly
toolchain installed. We install a nightly toolchain on CI, but it's a
little confusing that tests can fail on a fresh checkout on a new
laptop.
Instead, skip this test if there's no nightly toolchain.
2026-02-24 14:26:32 -05:00
Albab-Hasan
da7b8bbec2
fix: detect E0804 when casting raw ptr-to-dyn adds auto traits
...
the `check_ptr_ptr_cast` function had an early return when the source and
destination dyn trait objects shared the same principal trait def id:
if src_principal == dst_principal {
return Ok(());
}
this bypassed all three remaining checks that the code comment explicitly
listed as required: generic argument equality, projection equality, and
the auto-trait superset check. as a result, casts like
`*mut dyn Trait as *mut (dyn Trait + Send)` were silently accepted
instead of emitting E0804.
the fix removes the early return. `CastError::PtrPtrAddingAutoTraits` and
its diagnostic were already implemented — they just couldn't be reached.
the supertrait case (`trait Trait: Send`) continues to work correctly
because the auto-trait check already accounts for implied auto traits via
supertrait elaboration.
2026-02-24 18:59:02 +06:00
A4-Tacks
bc5e169317
fix: Fix scrutinee expr indent for replace_if_let_with_match
...
- Remove some redundant `.clone_for_update()` and `.indent(IndentLevel::single())`
Example
---
```rust
fn main() {
if true {
$0if true
&& false
{
foo()
}
}
}
```
**Before this PR**
```rust
fn main() {
if true {
match true
&& false {
true => foo(),
_ => (),
}
}
}
```
**After this PR**
```rust
fn main() {
if true {
match true
&& false {
true => foo(),
_ => (),
}
}
}
```
2026-02-24 19:12:51 +08:00
The rustc-josh-sync Cronjob Bot
2ee47149d1
Merge ref 'c78a29473a68' from rust-lang/rust
...
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: rust-lang/rust@c78a29473a
Filtered ref: rust-lang/rust-analyzer@d21f4bf288
Upstream diff: 139651428d...c78a29473a
This merge was created using https://github.com/rust-lang/josh-sync .
2026-02-23 04:45:13 +00:00