Commit graph

311366 commits

Author SHA1 Message Date
Chayim Refael Friedman
fe4e93622e Upgrade rustc crates
Major changes:

 - `GoalSource::InstantiateHigherRanked` was removed.
 - `Interner::UnevaluatedConstId` was introduced, allowing further simplifications due to better typing. Generally we don't represent unevaluated consts like we should, but it's still better.
 - `PatternKind::NotNull` was introduced.
2025-11-23 16:23:19 +02:00
Chayim Refael Friedman
7fb94ccad3
Merge pull request #21011 from dfaure-kdab/wip/dfaure/smolstr_pretty_printer
Provide a gdb pretty printer for smol_str::SmolStr
2025-11-23 14:04:07 +00:00
Chayim Refael Friedman
5dcba5774a
Merge pull request #21114 from lmmx/no-unused-tracing-attributes-feat
fix: no unused `tracing/attributes` feature
2025-11-23 13:51:54 +00:00
David Faure
a87db97854 Provide a gdb pretty printer for smol_str::SmolStr
Auto-loaded via the debugger_visualizer attribute.
Tested on smolstr's unittest:

$ RUSTFLAGS="-C debuginfo=2 -C opt-level=0" cargo test -p smol_str --no-run
$ rust-gdb target/debug/deps/test-a806b111557a7133
(gdb) break test::conversions
(gdb) run
(gdb) next
(gdb) print s
(and other locations in that file, to test the three cases: Inline,
Static and Heap)
2025-11-23 14:49:23 +01:00
Louis Maddox
674a44e120 fix: no unused tracing/attributes feature
- Discussed in https://github.com/rust-lang/rust-analyzer/issues/21107
- Avoids activating an `attributes` feature to crates that do not use it
- Updates the 6 crates that use attributes feature to specify it in
  their Cargo.toml: {hir,hir-def,hir-ty,ide-assists,ide-db,project-model}
2025-11-23 13:37:42 +00:00
Lukas Wirth
98797f0ce8
Merge pull request #21104 from Veykril/veykril/push-plqyyxsxvtyr
minor: Use `const_eval_static` query for statics
2025-11-23 13:06:52 +00:00
Lukas Wirth
e796bd41f1 Move transitive_rev_deps from db trait away 2025-11-23 13:56:59 +01:00
Lukas Wirth
277dffe9d6 De-querify transitive_deps again 2025-11-23 13:48:53 +01:00
Lukas Wirth
6285836732
Merge pull request #21065 from A4-Tacks/refutable-in-pat-field
Fix always irrefutable in RecordPatField
2025-11-23 12:37:03 +00:00
Lukas Wirth
b66ad113ec
Merge pull request #20559 from A4-Tacks/pretty-num-explicit-enum-disc
Add pretty number for add_explicit_enum_discriminant
2025-11-23 12:35:22 +00:00
Lukas Wirth
fa1e48b2d6
Merge pull request #21083 from A4-Tacks/cfg-pred-keyval-eq
feat: Completion ` = $0` after keyval cfg predicate
2025-11-23 12:33:05 +00:00
Lukas Wirth
e9d97d1326
Merge pull request #21093 from Young-Flash/convert_char_literal
feat: add assist to convert char literal
2025-11-23 12:31:23 +00:00
Lukas Wirth
957f9c9973
Merge pull request #21111 from A4-Tacks/fill-guarded-match-arm
Fix not fill guarded match arm for add_missing_match_arms
2025-11-23 11:51:10 +00:00
Lukas Wirth
be52a1e0da
Merge pull request #21113 from ChayimFriedman2/byte-range
fix: Infer range patterns correctly
2025-11-23 11:36:20 +00:00
Chayim Refael Friedman
00e780b9ec
Merge pull request #21017 from alexheretic/faster-inline-clones
Optimise `SmolStr::clone` 4-5x speedup inline, 0.5x heap (slow down)
2025-11-23 10:57:38 +00:00
Chayim Refael Friedman
edefb6d1fa Infer range patterns correctly
The type of a range pattern is the element's type, not the range type, unlike a range expression.
2025-11-23 12:55:02 +02:00
A4-Tacks
01d7b58818
Fix not fill guarded match arm for add_missing_match_arms
Example
---
```rust
enum Foo { A, B }
fn main() {
    match Foo::A {
        Foo::A if false => todo!(),
    }
}
```

**Before this PR**

```rust
enum Foo { A, B }
fn main() {
    match Foo::A {
        Foo::A if false => todo!(),
        Foo::B => todo!(),
    }
}
```

**After this PR**

```rust
enum Foo { A, B }
fn main() {
    match Foo::A {
        Foo::A if false => todo!(),
        Foo::A => todo!(),
        Foo::B => todo!(),
    }
}
```
2025-11-23 16:20:24 +08:00
Shoyu Vanilla (Flint)
e4a108614b
Merge pull request #21109 from Young-Flash/migrate_to_SyntaxEditor_api
internal: migrate to SyntaxEditor api for `replace_qualified_name_with_use`
2025-11-23 04:46:14 +00:00
Shoyu Vanilla (Flint)
4f3d92b034
Merge pull request #21090 from asuto15/fix/#21063
fix: Enhance remove_parentheses assist to handle return expressions
2025-11-23 04:42:55 +00:00
Young-Flash
e7e3648973 internal: migrate to SyntaxEditor api for replace_qualified_name_with_use 2025-11-23 12:29:57 +08:00
asuto15
860928795e
fix: Enhance remove_parentheses assist to handle return expressions 2025-11-23 12:51:05 +09:00
Lukas Wirth
037a0678bd Use const_eval_static query for statics 2025-11-22 23:08:50 +01:00
Lukas Wirth
010c56cb36 Turn transitive dependencies into a query 2025-11-22 22:26:43 +01:00
Lukas Wirth
bfec6076b7
Merge pull request #21105 from Veykril/veykril/push-uksmwpqtzops
metrics: Fix metrics
2025-11-22 21:16:42 +00:00
Lukas Wirth
6b23cb7513 metrics: Fix metrics 2025-11-22 22:06:42 +01:00
Lukas Wirth
24403acae9
Merge pull request #21103 from Veykril/veykril/push-lskorstqmvsv
analysis_stats: Record lang item queries, disable async drop in stats
2025-11-22 20:29:54 +00:00
Lukas Wirth
dac8fc8120 analysis_stats: Record lang item queries, disable async drop in stats 2025-11-22 21:20:23 +01:00
Chayim Refael Friedman
05d3472602
Merge pull request #21074 from Aditya-PS-05/fix/param-macro-names-21070
fix: show no error when parameters match macro names
2025-11-22 19:56:41 +00:00
Aditya-PS-05
dfc07975e0 fix: don't qualify macro names in pattern bindings 2025-11-22 23:13:02 +05:30
Lukas Wirth
ec557778f6
Merge pull request #21094 from Zalathar/dump
Print more macro information in `DefMap` dumps
2025-11-22 17:22:08 +00:00
Lukas Wirth
3d827b03b0
Merge pull request #21051 from Young-Flash/refactor
refactor: remove unused code
2025-11-22 17:09:04 +00:00
Zalathar
421bc6eb34 Also dump legacy-textual-scope macros 2025-11-22 17:33:58 +11:00
Zalathar
14d5ec349e Also dump the macro sub-namespace of macros 2025-11-22 17:33:58 +11:00
Zalathar
8ef7bc266b Make DefMap dumps nicer to read 2025-11-22 17:33:57 +11:00
Shoyu Vanilla (Flint)
ebf7fd1cb4
Merge pull request #21092 from Aditya-PS-05/fix/remove-parens-prefix-operators
fix: never remove parens from prefix ops with valueless return/break/continue
2025-11-22 06:04:58 +00:00
Young-Flash
898e5f6670 internal: update codegen assists-doc-tests & make clippy happy 2025-11-22 12:54:03 +08:00
Young-Flash
4f45b7407a test: add test case for convert_char_literal assist 2025-11-22 12:40:10 +08:00
Young-Flash
b240b411d8 feat: add assist to convert char literal 2025-11-22 12:33:44 +08:00
Shoyu Vanilla (Flint)
b31bdc1336
Merge pull request #21088 from osdyne/fix-tool-path
Fix trailing newline in tool_path
2025-11-21 17:44:49 +00:00
Shoyu Vanilla (Flint)
c4b8917db3
Merge pull request #20980 from ShoyuVanilla/shallow-normalize
fix: Remove some deep normalizations from infer
2025-11-21 17:04:41 +00:00
Shoyu Vanilla
0ba4e5d09a fix: Remove some deep normalizations from infer 2025-11-22 01:55:01 +09:00
Shoyu Vanilla (Flint)
db70ac9369
Merge pull request #21069 from Aditya-PS-05/feat/add-regression-test-19957
feat: add test for async-trait type mismatch
2025-11-21 16:09:42 +00:00
Michael Gruenewald
11a8e51cd8 Fix tool_path 2025-11-21 17:06:37 +01:00
Lukas Wirth
b22210538c
Merge pull request #21087 from Veykril/push-luroyzyzkwty
perf: Prime trait impls in cache priming
2025-11-21 14:58:37 +00:00
Lukas Wirth
7d7b4b2dc7 perf: Prime trait impls in cache priming 2025-11-21 15:48:42 +01:00
Lukas Wirth
26d549680a
Merge pull request #21086 from Veykril/push-vytnrvtwsqqn
perf: Reduce allocations in `try_evaluate_obligations`
2025-11-21 14:31:30 +00:00
Lukas Wirth
31a3be2370 perf: Reduce allocations in try_evaluate_obligations 2025-11-21 15:21:20 +01:00
Young-Flash
b3db306b11 refactor: remove unused code 2025-11-21 22:12:08 +08:00
Lukas Wirth
addb11c9ec
Merge pull request #21085 from Veykril/push-kxznsnvokkvp
perf: Produce less progress reports
2025-11-21 13:54:49 +00:00
Lukas Wirth
5066867d89 perf: Produce less progress reports 2025-11-21 14:41:00 +01:00