22736 Commits

Author SHA1 Message Date
Chayim Refael Friedman
2e0b3643ed Disable tests in flycheck if cfg.setTest is set to false 2025-07-21 16:34:12 +03:00
Laurențiu Nicola
58e507d807
Merge pull request #20255 from A4-Tacks/deref-intranstive
Fix ide-assist: generate Deref transitive
2025-07-20 10:54:35 +00:00
Chayim Refael Friedman
b1914e420f Support cfg_select! 2025-07-20 11:56:45 +03:00
Young-Flash
0901631095 minor: remove unused var 2025-07-19 16:19:20 +08:00
A4-Tacks
53483b4f95
Fix ide-assist: Deref transtive 2025-07-19 13:38:01 +08:00
Shoyu Vanilla (Flint)
4f294fc2a1
Merge pull request #19783 from A4-Tacks/generate-single-field-from
Add ide-assist, generate single field struct From
2025-07-18 01:58:30 +00:00
A4-Tacks
aa34fab642
Add tailexpr & -> &mut for generate_mut_trait_impl 2025-07-17 00:49:56 +08:00
Shoyu Vanilla (Flint)
3c9ce17867
Merge pull request #19917 from A4-Tacks/ext-generate-mut
Add AsRef and Borrow for generate_mut_trait_impl
2025-07-16 15:39:47 +00:00
A4-Tacks
6598a38174
Add AsMut to minicore prelude::v1 2025-07-16 21:27:39 +08:00
A4-Tacks
fc5dd8b798
Use hir::Trait in parameter 2025-07-16 19:51:16 +08:00
A4-Tacks
28f1e62482
Remove redundant type parameters 2025-07-16 17:17:00 +08:00
A4-Tacks
a977cb1ce8
Add AsRef and Borrow for generate_mut_trait_impl
- AsRef -> AsMut
- Borrow -> BorrowMut

Example
====================

```rust
//- minicore: as_ref
struct Foo(i32);

impl<T> core::convert::AsRef$0<i32> for Foo {
    fn as_ref(&self) -> &i32 {
        &self.0
    }
}
```
->
```rust
struct Foo(i32);

$0impl<T> core::convert::AsMut<i32> for Foo {
    fn as_mut(&mut self) -> &mut i32 {
        &self.0
    }
}

impl<T> core::convert::AsRef<i32> for Foo {
    fn as_ref(&self) -> &i32 {
        &self.0
    }
}
```
2025-07-16 17:16:56 +08:00
Shoyu Vanilla (Flint)
f76d2ef4d9
Merge pull request #20178 from ShoyuVanilla/cargo-config-cleanup
chore: Cleanup cargo config queries
2025-07-15 16:13:30 +00:00
Laurențiu Nicola
0e2e6e7a8a Format and bump rustc crates 2025-07-15 17:41:08 +03:00
Laurențiu Nicola
f373437c22 Merge from rust-lang/rust 2025-07-15 17:27:46 +03:00
Shoyu Vanilla
d6bdcf2f08 Further decrease number of cargo metadata invokes 2025-07-15 22:49:16 +09:00
Shoyu Vanilla
8dad658bea chore: Cleanup cargo config queries 2025-07-15 22:49:16 +09:00
Chayim Refael Friedman
f19c89da36 Infer lifetimes for GATs in expression/pattern position
We should not only in type position.
2025-07-15 01:15:33 +03:00
Shoyu Vanilla (Flint)
e10d64eb40
Merge pull request #20234 from Hmikihiro/migrate_ted_remove_default
Remove `ConstParam::remove_default` and `TypeParam::remove_default` to migrate from ted
2025-07-14 06:42:36 +00:00
Chayim Refael Friedman
591e3b7624
Merge pull request #20236 from gvozdvmozgu/patch-1
remove now useless `#[allow(unused_lifetimes)]`
2025-07-13 17:45:06 +00:00
Deadbeef
cc08f71756 update issue number for const_trait_impl 2025-07-13 23:55:06 +08:00
Andrey Nikolaev
2b861a7410
remove now useless [allow(unused_lifetimes)] 2025-07-13 05:43:05 -04:00
Hayashi Mikihiro
435b2962a0 remove remove_default 2025-07-13 02:03:56 +09:00
A4-Tacks
d001e27173
Fix assoc type where clause position 2025-07-12 23:48:41 +08:00
Shoyu Vanilla (Flint)
a489123e80
Merge pull request #20232 from ShoyuVanilla/issue-20225
fix: Normalize projection types before calculating memory maps
2025-07-11 19:32:53 +00:00
Shoyu Vanilla
f6e11e8248 Add a memory map bound check assertion on rendering const slice 2025-07-11 23:44:49 +09:00
Chayim Refael Friedman
4b29a9d6ea
Merge pull request #20219 from ChayimFriedman2/expr-store-mem
perf: Put the expression stuff in the expression store behind an `Option<Box>`
2025-07-11 14:25:39 +00:00
Shoyu Vanilla
4b2593085d fix: Normalize projection types before calculating memory maps 2025-07-11 23:10:03 +09:00
Shoyu Vanilla (Flint)
eaeee0be5a
Merge pull request #20224 from Hmikihiro/migrate_remove_dbg
Migrate `remove_dbg` assist to use `SyntaxEditor`
2025-07-11 07:41:34 +00:00
Hayashi Mikihiro
c79e24c1f1 Migrate remove_dbg assist to use SyntaxEditor 2025-07-11 16:24:57 +09:00
Matthias Krüger
562dab675c
Rollup merge of #143708 - epage:pretty, r=compiler-errors
fix: Include frontmatter in -Zunpretty output

In the implementation (rust-lang/rust#140035), this was left as an open question for
the tracking issue (rust-lang/rust#136889).  My assumption is that this should be
carried over.

The test was carried over from rust-lang/rust#137193 which was superseded by rust-lang/rust#140035.

Thankfully, either way, `-Zunpretty` is unstable and we can always
change it even if we stabilize frontmatter.
2025-07-11 07:35:21 +02:00
Chayim Refael Friedman
e2c8cefa63
Merge pull request #20228 from ChayimFriedman2/fix-use-display
fix: Fix display of `use<>` syntax
2025-07-10 21:19:38 +00:00
Chayim Refael Friedman
1d3ca1d6f3 Fix display of use<> syntax 2025-07-11 00:08:24 +03:00
Shoyu Vanilla (Flint)
600f573256
Merge pull request #20054 from Young-Flash/folding_all
feat: support folding multiline arg list & fn body in one folding range
2025-07-10 12:05:31 +00:00
Hayashi Mikihiro
c3a5a8c22a Migrate generate_impl assist to use SyntaxEditor 2025-07-10 18:12:16 +09:00
Shoyu Vanilla (Flint)
e9968fc555
Merge pull request #20210 from ChayimFriedman2/naked-asm-safe
fix: Inline asm fixes
2025-07-10 06:28:49 +00:00
yukang
c37949c628 remove unnecessary parens in rust-analyzer 2025-07-10 13:50:02 +08:00
Laurențiu Nicola
8789098dbc Revert "remove if-let chains"
This reverts commit fcc81a38b3ed55447735f71e8d374fcb36c22f24.
2025-07-10 08:24:53 +03:00
Shoyu Vanilla (Flint)
eede8f1f4e
Merge pull request #20212 from ChayimFriedman2/dyn-hint
fix: Fixes for `dyn` inlay hint
2025-07-10 04:57:57 +00:00
Hayashi Mikihiro
be609a57bf Migrate convert_match_to_let_else assist to use SyntaxEditor
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-10 11:22:32 +09:00
Chayim Refael Friedman
ad708fdbd1 Put the expression stuff in the expression store behind an Option<Box>
And leave only the type stuff without it.

This is because most expression stores don't have anything but types (e.g. generics, fields, signatures) so this saves a lot of memory.

This saves 58mb on `analysis-stats .`.
2025-07-10 05:18:43 +03:00
Ed Page
f4d9018a48 feat(lexer): Allow including frontmatter with 'tokenize' 2025-07-09 16:42:27 -05:00
Chayim Refael Friedman
f8e2fa0e80 Make AsmExpr have AstId
We need it because `global_asm!()` is an item. It's unfortunate that such thing can slip in and I see no way to automatically catch that, but thankfully analysis-stats on self has caught that.
2025-07-09 21:43:20 +03:00
Chayim Refael Friedman
a8e67dffca Put dyn inlay hints in their correct place in presence of parentheses 2025-07-09 19:33:47 +03:00
Chayim Refael Friedman
5e30dab65c Disable the diagnostics_dont_block_typing test on CI
It's failing to much. We need to fix it, but my changes are unlikely to be the cause.
2025-07-09 19:29:11 +03:00
Chayim Refael Friedman
3931afa624 Don't show dyn hint in a HRTB bound 2025-07-09 19:19:51 +03:00
Hayashi Mikihiro
5a410c3215 migrate convert_named_struct_to_tuple_struct assist to use 'SyntaxEditor'
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-10 01:01:47 +09:00
Chayim Refael Friedman
95c04c4503 Make global_asm!() work
Because apparently, we were not accepting inline asm in item position, completely breaking it.
2025-07-09 18:55:27 +03:00
Shoyu Vanilla (Flint)
64551a5696
Merge pull request #20109 from Hmikihiro/generate_new_tuple_field
feat: Generate `new` for tuple struct
2025-07-09 15:22:47 +00:00
Chayim Refael Friedman
bd8087e86e Differentiate between asm!(), global_asm!() and naked_asm!(), and make only asm!() unsafe 2025-07-09 17:37:27 +03:00