Chayim Refael Friedman
9c4a7705b1
Fix some things with builtin derives
...
1. Err on unions on derive where it's required.
2. Err on `#[derive(Default)]` on enums without `#[default]` variant.
3. Don't add where bounds `T: Default` when expanding `Default` on enums (structs need that, enums not).
Also, because I was annoyed by that, in minicore, add a way to filter on multiple flags in the line-filter (`// :`). This is required for the `Debug` and `Hash` derives, because the derive should be in the prelude but the trait not.
2025-07-03 23:05:56 +03:00
yukang
d8b424cb4c
Remove unnecessary parens in closure
2025-06-29 19:28:48 +08:00
Chayim Refael Friedman
0b6df1716d
Fix completion in when typing integer.|
...
It should show integer, not floating point methods.
2025-06-27 00:12:27 +03:00
Chayim Refael Friedman
4db8341ddb
Prettify AST in PathTransform
if it's coming from a macro
2025-06-26 10:03:44 +03:00
Lukas Wirth
b50d527931
Merge pull request #20036 from Veykril/push-yquvoyrxkksx
...
Do not default to 'static for trait object lifetimes
2025-06-24 06:59:54 +00:00
Lukas Wirth
2b05bd7d7e
Do not default to 'static for trait object lifetimes
...
We lack trait object default lifetime elision, so `'static` can be wrong at times, confusing the user
2025-06-24 08:49:24 +02:00
Chayim Refael Friedman
de312d0c71
Don't run doctests
2025-06-23 00:50:22 +03:00
Shoyu Vanilla
4f8767d790
Minic rustc's new format_args!
expansion
2025-06-22 13:22:28 +09:00
Lukas Wirth
6301c35cf3
Revert "Turn BlockId
into a #[salsa::tracked]
"
...
This reverts commit 8643a858dbaf12b37e90b603cdee64434576c229.
2025-06-19 07:40:01 +02:00
Laurențiu Nicola
5d93e31067
Merge pull request #20025 from SoxPopuli/hide_private_imports_without_pe
...
Hide imported privates if private editable is disabled
2025-06-17 15:27:27 +00:00
Charlotte Smith
e6a4602209
Hide imported privates if private editable is disabled
2025-06-17 15:38:15 +01:00
Lukas Wirth
3bf8a77d13
Merge pull request #20023 from Veykril/push-vkqlnyttnqzl
...
Improve completions in if / while expression conditions
2025-06-17 12:01:43 +00:00
Lukas Wirth
7447db83ed
Better completion test sorting
2025-06-17 13:50:58 +02:00
Lukas Wirth
4331688e3d
Improve completions in if / while expression conditions
2025-06-17 13:50:58 +02:00
Lukas Wirth
03f1003637
chore: Start infesting ide crates with 'db lifetime
2025-06-17 10:42:38 +02:00
Ryan Mehri
b95101ce46
add qualifiers to attribute completions
2025-06-04 11:02:48 -04:00
Ryan Mehri
f1cc7c5c92
match on segments of path and some small cleanup
2025-06-04 08:30:27 -04:00
Ryan Mehri
7e8079fbad
feat: implement completion for diagnostic module
2025-06-02 20:56:20 -04:00
Ryan Mehri
fb921c3039
fix: don't duplicate must_use for functions and traits
2025-06-02 15:35:13 -04:00
Chayim Refael Friedman
7fa66d67a7
Merge pull request #19862 from ChayimFriedman2/item-resolve-macro-hir
...
fix: Fix IDE resolution of item macros
2025-05-26 21:34:18 +00:00
Chayim Refael Friedman
87529e8631
Properly implement might_be_inside_macro_call()
using semantic information instead of syntactical hacks
...
And rename it to `is_inside_macro_call()` accordingly.
2025-05-25 20:15:58 +03:00
Chayim Refael Friedman
3e0ab7219a
Fix IDE resolution of item macros
...
It wasn't inside the source, because there was no source map.
2025-05-25 17:20:20 +03:00
Chayim Refael Friedman
6e8ad1666a
Fix postfix snippets duplicating derefs
2025-05-08 11:44:38 +03:00
Chayim Refael Friedman
70842faa4d
Still complete parentheses & method call arguments if there are existing parentheses, but they are after a newline
2025-05-08 11:05:39 +03:00
Victor
32e09de7c2
Support environment variable CARGO_MANIFEST_PATH.
2025-05-05 22:13:48 +02:00
A4-Tacks
850d122fd4
Improve let snippet
2025-05-03 17:04:11 +08:00
A4-Tacks
d922c20158
Improve the let code snippet
2025-05-03 13:15:32 +08:00
Lukas Wirth
235d88bf42
Render more lifetimes
2025-05-02 14:36:18 +02:00
Matthias Krüger
573c47c9ba
remove a couple of clones
2025-05-01 11:41:42 +02:00
Lukas Wirth
e0dca847ad
fix: Improve parser recovery a bit
2025-04-30 16:40:01 +02:00
David Barsky
fe7b4f2ad9
Merge pull request #19699 from ChayimFriedman2/escape-label
...
fix: Escape raw names in labels properly
2025-04-28 21:12:21 +00:00
Lukas Wirth
7e526b6be7
Add expression fill mode variant for filling with underscore expressions
2025-04-28 10:39:36 +02:00
Chayim Refael Friedman
e6ebf0b8a1
Don't escape 'static
...
As it is a valid lifetime without escaping.
It does need to be escaped as a label, but we have no way to distinguish that.
2025-04-26 21:20:43 +03:00
Chayim Refael Friedman
d781d02cf4
Escape raw names in labels properly
2025-04-26 21:10:43 +03:00
Lukas Wirth
34e7d60e30
Merge pull request #19644 from ChayimFriedman2/const-syms
...
internal: Make predefined symbols `const` instead of `static`
2025-04-21 12:34:59 +00:00
Lukas Wirth
a5540bd98d
Merge pull request #19604 from WtzLAS/fix-issue-19601
...
Add semicolon to use
2025-04-21 12:34:07 +00:00
Chayim Refael Friedman
0f325c7ff8
Remove unnecessary predefined symbol clones
...
Now that they're const it's no longer needed.
Nothing manual was performed: only a regexp search of `sym::([\w][\w\d]*)\.clone\(\)` and replace by `sym::$1`.
2025-04-21 03:10:13 +03:00
Chayim Refael Friedman
9477e46bec
Get rid of static predefined symbols
...
Make them all `const`.
2025-04-21 03:07:35 +03:00
Chayim Refael Friedman
c58ddafe90
Make HirFileId
, EditionedFileId
and macro files Salsa struct
...
And make more queries non-interned.
Also flip the default for queries, now the default is to not intern and to intern a query you need to say `invoke_interned`.
2025-04-19 22:10:52 +03:00
Wtz_LASR
c0bc939053
add semicolon to use
2025-04-16 21:13:01 +08:00
Chayim Refael Friedman
8a9a1e3345
Remove all upcasts!
...
It turns out there were a lot redundant too.
2025-04-10 11:08:38 +03:00
Lukas Wirth
7255ef1375
fix(auto-import): Prefer imports of matching types for argument lists
2025-04-08 09:21:32 +02:00
Lukas Wirth
bec545920a
Merge pull request #19447 from Natural-selection1/add_impl_for
...
add more completion about "impl"
2025-04-05 13:01:51 +00:00
BenjaminBrienen
2462624a7d
prefer default over new
2025-04-04 15:49:50 +02:00
Lukas Wirth
1e1571e1c8
fix: Fix new nightly lints
2025-03-31 13:27:54 +02:00
Hegui Dai
e3ec43319a
update test
2025-03-28 18:28:56 +08:00
Hegui Dai
307cd68fc6
move "impl<> for <>" and test about it
2025-03-28 18:25:32 +08:00
Chayim Refael Friedman
7b584ef9bf
Allow crate authors to control completion of their things
...
Via the new `#[rust_analyzer::completions(...)]` attribute.
Also fix a bug with existing settings for that where the paths wouldn't resolve correctly.
2025-03-27 14:01:26 +02:00
Hegui Dai
edd450abc9
add more completion about "impl"
2025-03-25 14:31:28 +08:00
Lukas Wirth
500ea05aef
chore: Bump dependencies
2025-03-23 08:46:10 +01:00