| Age | Commit message (Collapse) | Author | Lines |
|
`rust-analyzer` subtree update
Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/a6bc4a4bbe6a65b71cbf76a0cf528c47a8d9f97f.
Created using https://github.com/rust-lang/josh-sync.
r? `@ghost`
|
|
|
|
|
|
Oblarg/fix-negative-int-literals-in-macro-by-example
Fix negative integer literals in const generics in declarative macro context
|
|
|
|
Add `all` `any` and `not` attribute completions
|
|
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: f957826bff7a68b267ce75b1ea56352aed0cca0a
Filtered ref: 7291893f9d875b6e8775a7a0e661abdaec15d3c1
Upstream diff: https://github.com/rust-lang/rust/compare/caccb4d0368bd918ef6668af8e13834d07040417...f957826bff7a68b267ce75b1ea56352aed0cca0a
This merge was created using https://github.com/rust-lang/josh-sync.
|
|
Much of the compiler calls functions on Align projected from AbiAlign.
AbiAlign impls Deref to its inner Align, so we can simplify these away.
Also, it will minimize disruption when AbiAlign is removed.
For now, preserve usages that might resolve to PartialOrd or PartialEq,
as those have odd inference.
|
|
Allow `&raw [mut | const]` for union field
|
|
Example
---
`#[cfg($0)]` -> `#[cfg(any($0))]`
|
|
Migrate `replace_arith_op` assist to use `SyntaxEditor`
|
|
Add applicable on bang `!` for apply_demorgan
|
|
|
|
Fix precedence parenthesis for replace_arith_op
|
|
Add cfg_attr predicate completion
|
|
Add const parameter keyword completion
|
|
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;
}
```
|
|
Add let-chain support for convert_to_guarded_return
|
|
Fix applicable on if-let-chain for invert_if
|
|
Fix fixes for unused raw variables
|
|
const generic params
|
|
I.e. do not mark them as used, or non-speculative loaded, or similar.
Previously they were sometimes finalized during early resolution, causing issues like https://github.com/rust-lang/rust/pull/144793#issuecomment-3168108005.
|
|
Example
---
```rust
fn main() {
let _f = || {
bar();
if$0 true {
foo();
// comment
bar();
}
}
}
```
->
```rust
fn main() {
let _f = || {
bar();
if false {
return;
}
foo();
// comment
bar();
}
}
```
|
|
Example
---
```rust
fn main() {
let _x = loop {
if$0 let Ok(x) = Err(92) {
foo(x);
}
};
}
```
**Before**:
Assist not applicable
**After**:
```rust
fn main() {
let _x = loop {
let Ok(x) = Err(92) else { continue };
foo(x);
};
}
```
|
|
- And add early expression `None` in function `Option` return
Example
---
```rust
fn main() {
if$0 let Ok(x) = Err(92)
&& x < 30
&& let Some(y) = Some(8)
{
foo(x, y);
}
}
```
->
```rust
fn main() {
let Ok(x) = Err(92) else { return };
if x >= 30 {
return;
}
let Some(y) = Some(8) else { return };
foo(x, y);
}
```
|
|
Example
---
```
fn main() {
let $0r#type = 2;
}
```
**Before this PR**:
```rust
fn main() {
let _r#type = 2;
}
```
**After this PR**:
```rust
fn main() {
let _type = 2;
}
```
|
|
Remove non-ns version of impl_self_ty and impl_trait
|
|
fix SCIP panicking due to salsa not attaching
|
|
Pull recent changes from https://github.com/rust-lang/rust via Josh.
Upstream ref: caccb4d0368bd918ef6668af8e13834d07040417
Filtered ref: 0f345ed05d559bbfb754f1403b16199366cda2e0
Upstream diff: https://github.com/rust-lang/rust/compare/21a19c297d4f5a03501d92ca251bd7a17073c08a...caccb4d0368bd918ef6668af8e13834d07040417
This merge was created using https://github.com/rust-lang/josh-sync.
|
|
|
|
fallback.rs was ported straight from rustc (minus the lint parts).
This fixes the `!` regressions.
|
|
Expose iterators over an inference result's types
|
|
|
|
Example
---
```rust
fn f() { i$0f x && let Some(_) = Some(1) { 1 } else { 0 } }
```
**Before this PR**:
```rust
fn f() { if !(x && let Some(_) = Some(1)) { 0 } else { 1 } }
```
**After this PR**:
Assist not applicable
|
|
|
|
Convert more things from chalk to next solver
|
|
named_associated_type_shorthand_candidates
|
|
|
|
lower::callable_item_signature
|
|
Fix "Replace match with if let" not to trigger when invalid transformations occur
|
|
(This re-introduces a reduced access to a couple of previously public fields on `InferenceResult`)
|
|
|
|
|
|
Migrate `expand_record_rest_pattern` assist to use `SyntaxEditor`
|
|
Because `add_field` uses `ted`
|
|
Example
---
```rust
fn foo<c$0>() {}
```
->
```rust
fn foo<const $1: $0>() {}
```
|
|
|
|
|
|
|