Chayim Refael Friedman
88e4ea560a
Merge pull request #20891 from daladim/semantic_type_for_logical_not
...
Semantic type for logical not
2025-10-23 15:46:11 +00:00
daladim
1ef688810f
Updated unit tests
2025-10-23 16:58:12 +02:00
daladim
68cb0a9b3f
Added the "negation" semantic token
2025-10-23 16:38:26 +02:00
Chayim Refael Friedman
3f8c2129d7
Merge pull request #20888 from ShoyuVanilla/bump-rustc-deps
...
internal: Bump rustc deps
2025-10-23 06:06:46 +00:00
Shoyu Vanilla (Flint)
e13aab74c9
Merge pull request #20884 from ChayimFriedman2/fix-cfg-error
...
fix: Fix "cannot insert `true` or `false` to cfg" error in fixtures
2025-10-23 00:11:51 +00:00
Shoyu Vanilla
9610f01c52
Port CanonicalInstantiator from rustc
2025-10-23 09:09:49 +09:00
Shoyu Vanilla
40e36a0687
Bump rustc deps
2025-10-23 08:40:18 +09:00
Chayim Refael Friedman
3cc95dfffb
Merge pull request #20887 from rust-lang/revert-20316-better-attrs
...
Revert "internal: Rewrite attribute handling"
2025-10-22 16:28:43 +00:00
Chayim Refael Friedman
2ae4ddbecb
Revert "internal: Rewrite attribute handling"
2025-10-22 19:19:13 +03:00
Chayim Refael Friedman
659aa56adb
Merge pull request #20316 from ChayimFriedman2/better-attrs
...
internal: Rewrite attribute handling
2025-10-22 12:46:19 +00:00
Lukas Wirth
e3ece38d52
Merge pull request #20886 from A4-Tacks/parse-missing-method-name
...
Improve parsing of missing name in MethodCallExpr
2025-10-22 10:30:55 +00:00
Chayim Refael Friedman
7773fe0fb8
Rewrite attribute handling
...
Basically, we switch to expanding cfg_attr in AST form, filter irrelevant attributes from the item tree, and move hir-def attributes (non-item-tree) to be flag-based.
The main motivation is memory usage, although this also simplifies the code, and fixes some bugs around handling of `cfg_attr`s.
2025-10-22 11:47:01 +03:00
A4-Tacks
922aad6b6d
Improve parsing of missing name in MethodCallExpr
...
Usually, this occurs when preparing to input a method name
However, once an identifier is entered, it is not reasonable for the parsing result to change from `CallExpr(FieldExpr())` to `MethodCallExpr()`
Example
---
```rust
fn foo() {
x.
()
}
```
**Before this PR**:
```text
SOURCE_FILE
FN
FN_KW "fn"
WHITESPACE " "
NAME
IDENT "foo"
PARAM_LIST
L_PAREN "("
R_PAREN ")"
WHITESPACE " "
BLOCK_EXPR
STMT_LIST
L_CURLY "{"
WHITESPACE "\n "
CALL_EXPR
FIELD_EXPR
PATH_EXPR
PATH
PATH_SEGMENT
NAME_REF
IDENT "x"
DOT "."
WHITESPACE "\n "
ARG_LIST
L_PAREN "("
R_PAREN ")"
WHITESPACE "\n"
R_CURLY "}"
WHITESPACE "\n"
error 17: expected field name or number
```
**After this PR**:
```text
SOURCE_FILE
FN
FN_KW "fn"
WHITESPACE " "
NAME
IDENT "foo"
PARAM_LIST
L_PAREN "("
R_PAREN ")"
WHITESPACE " "
BLOCK_EXPR
STMT_LIST
L_CURLY "{"
WHITESPACE "\n "
METHOD_CALL_EXPR
PATH_EXPR
PATH
PATH_SEGMENT
NAME_REF
IDENT "x"
DOT "."
WHITESPACE "\n "
ARG_LIST
L_PAREN "("
R_PAREN ")"
WHITESPACE "\n"
R_CURLY "}"
WHITESPACE "\n"
error 17: expected method name, field name or number
```
2025-10-22 14:37:12 +08:00
Chayim Refael Friedman
1b945793ee
Merge pull request #20571 from A4-Tacks/type-kw-comp
...
Add type keywords completions
2025-10-22 03:52:52 +00:00
Chayim Refael Friedman
cef7df38b6
Merge pull request #20831 from A4-Tacks/record-expr-shorthand
...
Add shorthand field completion for record-expr
2025-10-22 03:52:27 +00:00
A4-Tacks
70e3d8ca5c
Add type keywords completions
...
Example
---
```
kw dyn
kw fn
kw for
kw impl
```
2025-10-22 11:35:09 +08:00
A4-Tacks
6fe555360e
Add shorthand field completion for record-expr
...
Example
---
```rust
struct Foo { bar: bool, n: i32 }
fn baz() {
let bar = true;
let foo: Foo = Fo$0;
}
```
**Before this PR**:
```rust
struct Foo { bar: bool, n: i32 }
fn baz() {
let bar = true;
let foo: Foo = Foo { bar: ${1:()}, n: ${2:()} }$0;
}
```
**After this PR**:
```rust
struct Foo { bar: bool, n: i32 }
fn baz() {
let bar = true;
let foo: Foo = Foo { bar$1, n: ${2:()} }$0;
}
```
2025-10-22 11:31:43 +08:00
Chayim Refael Friedman
db2e268314
Merge pull request #20670 from A4-Tacks/heuristic-newline-in-block-expr
...
Add heuristic sensing `is_in_block`
2025-10-22 03:24:24 +00:00
A4-Tacks
911edbfe81
Add heuristic sensing is_in_block
...
Example
---
```rust
fn foo() -> [i32; 2] {
l$0
[0, n]
}
```
**Before this PR**:
```text
loop~
line!(…)~ macro_rules! line
```
**After this PR**:
```text
let~
loop~
letm~
line!(…)~ macro_rules! line
```
2025-10-22 11:14:31 +08:00
Chayim Refael Friedman
f04279b06d
Merge pull request #20755 from A4-Tacks/doc-include
...
Add `doc = include_str!("…")` completion
2025-10-22 03:01:22 +00:00
Chayim Refael Friedman
f7a7ed8bfd
Merge pull request #20771 from A4-Tacks/else-kw-invert-if
...
Add applicable on `else` for invert_if
2025-10-22 02:52:22 +00:00
Chayim Refael Friedman
385bd28558
Fix "cannot insert true or false to cfg" error in fixtures
2025-10-22 05:17:27 +03:00
Chayim Refael Friedman
fe17c400de
Merge pull request #20882 from ChayimFriedman2/accurate-mem-report
...
internal: Clear next-solver cache before reporting memory usage in analysis-stats
2025-10-21 20:07:50 +00:00
Chayim Refael Friedman
d76463c857
Clear next-solver cache before reporting memory usage in analysis-stats
...
The cache shouldn't be included, as it is mostly temporary (per-revision).
2025-10-21 22:58:31 +03:00
Chayim Refael Friedman
c084f044df
Merge pull request #20554 from dpaoliello/extraenv
...
Improvements for resolving the value of the `env!` macro
2025-10-21 18:10:57 +00:00
Daniel Paoliello
ba61c29ce1
Allow env vars set in cargo.extraEnv to be resolved by the env! macro
2025-10-21 11:00:27 -07:00
Shoyu Vanilla (Flint)
3643535c16
Merge pull request #20850 from A4-Tacks/add-mis-match-arms-indent
...
Migrate `add_missing_match_arms` assist, because edit_in_place uses ted
2025-10-21 05:00:12 +00:00
Shoyu Vanilla (Flint)
d6573fde9d
Merge pull request #20880 from A4-Tacks/conv-tuple-to-named-rest-pat
...
Fix invalid RestPat for convert_tuple_struct_to_named_struct
2025-10-21 04:59:16 +00:00
Shoyu Vanilla (Flint)
34af63109f
Merge pull request #20872 from A4-Tacks/conv-named-to-tuple-rest-pat
...
Fix missing RestPat for convert_named_struct_to_tuple_struct
2025-10-21 04:54:46 +00:00
A4-Tacks
e6656c19b4
Fix invalid RestPat for convert_tuple_struct_to_named_struct
...
```rust
struct X$0(i8, i16, i32, i64);
fn foo(X(a, .., d): X) {}
```
**Before this PR**:
```rust
struct X { field1: i8, field2: i16, field3: i32, field4: i64 }
fn foo(X { field1: a, field2: .., field3: d }: X) {}
```
**After this PR**:
```rust
struct X { field1: i8, field2: i16, field3: i32, field4: i64 }
fn foo(X { field1: a, field4: d, .. }: X) {}
```
2025-10-21 11:52:06 +08:00
A4-Tacks
37147c4135
Add a FIXME for unordered fields
2025-10-21 11:27:50 +08:00
Chayim Refael Friedman
b4873f2343
Merge pull request #20878 from ChayimFriedman2/clippy-fix
...
minor: Fix beta warnings
2025-10-20 16:10:39 +00:00
Chayim Refael Friedman
14c771a24c
Fix beta Clippy
2025-10-20 19:00:42 +03:00
Chayim Refael Friedman
aae9712904
Merge pull request #20873 from ChayimFriedman2/to-ns2
...
Rip Chalk out of the codebase 🎉
2025-10-20 15:37:53 +00:00
Lukas Wirth
d25a6763d2
Merge pull request #20876 from rust-lang/push-lznzsmuxzsot
...
fix: Fix `signature_help` to proto conversion creating invalid utf16 offsets
2025-10-20 14:40:04 +00:00
Lukas Wirth
b5263103b8
fix: Fix signature_help to proto conversion creating invalid utf16 offsets
2025-10-20 16:30:17 +02:00
Lukas Wirth
50577871b1
Merge pull request #20854 from epage/frontmatter
...
feat(parser): Don't error on frontmatter
2025-10-20 08:58:23 +00:00
Chayim Refael Friedman
9b0d532687
Rip Chalk out of the codebase!
2025-10-20 11:21:28 +03:00
A4-Tacks
2c48c398f7
Fix missing RestPat for convert_named_struct_to_tuple_struct
...
Example
---
```rust
struct Inner;
struct A$0 { inner: Inner }
fn foo(A { .. }: A) {}
```
**Before this PR**:
```rust
struct Inner;
struct A(Inner);
fn foo(A(): A) {}
```
**After this PR**:
```rust
struct Inner;
struct A(Inner);
fn foo(A(..): A) {}
```
2025-10-20 15:04:51 +08:00
Shoyu Vanilla (Flint)
2edfc8240b
Merge pull request #20867 from ChayimFriedman2/to-ns-almost-final
...
Migrate variance to the next solver and remove lint allows from its stuff
2025-10-20 06:22:49 +00:00
Chayim Refael Friedman
fd59d49d6e
Merge pull request #20866 from ShoyuVanilla/metadata-err
...
fix: Run `cargo metadata` on sysroot with cwd=sysroot
2025-10-19 18:26:50 +00:00
Chayim Refael Friedman
369715b77c
Remove lint allows from new solver stuff
2025-10-19 21:14:10 +03:00
Chayim Refael Friedman
6232ba8d08
Migrate variance to the new solver
2025-10-19 21:14:10 +03:00
Shoyu Vanilla (Flint)
7c871c2a4b
Merge pull request #20860 from A4-Tacks/migrate-single-field-from
...
Migrate `generate_single_field_struct_from` assist to use `SyntaxEditor`
2025-10-19 17:04:56 +00:00
Shoyu Vanilla (Flint)
b6c29e07ba
Merge pull request #20845 from A4-Tacks/migrate-add-braces
...
Migrate `add_braces` assist, because edit_in_place uses ted
2025-10-19 17:03:59 +00:00
Shoyu Vanilla (Flint)
e1a923a21e
Merge pull request #20852 from ChayimFriedman2/xtask-install-never
...
Do not use `force-always-assert` in `xtask install` by default
2025-10-19 17:01:40 +00:00
Shoyu Vanilla (Flint)
400896d1e1
Merge pull request #20841 from ChayimFriedman2/to-ns
...
Migrate more stuff to the next solver
2025-10-19 17:00:44 +00:00
Shoyu Vanilla
4182a95e05
fix: Report metadata errors for sysroot
2025-10-20 01:55:52 +09:00
Shoyu Vanilla
0aa39c4233
fix: Run cargo metadata on sysroot with cwd=sysroot
2025-10-19 18:31:26 +09:00
A4-Tacks
d3263775c4
Migrate generate_single_field_struct_from assist to use SyntaxEditor
2025-10-18 10:21:35 +08:00