Commit graph

32939 commits

Author SHA1 Message Date
Laurențiu Nicola
9923b0085c
Merge pull request #18913 from Wilfred/grammar_fix
minor: Fix grammar in doc comments
2025-01-11 06:19:03 +00:00
Wilfred Hughes
7f6b8745c8 minor: Fix grammar in doc comments
"too" should be "to" here.
2025-01-10 17:38:14 -08:00
Lukas Wirth
4f35021ca9
Merge pull request #18907 from Veykril/push-uqlzpttmvurv
Implement `#[rust_analyzer::skip]` for bodies
2025-01-10 13:59:23 +00:00
Lukas Wirth
f209d50dcf Implement #[rust_analyzer::skip] for bodies 2025-01-10 14:41:27 +01:00
Lukas Wirth
e8ad0c03e8
Merge pull request #18906 from Veykril/push-upuxsyovskmt
feat: Re-implement rust string highlighting via tool attribute
2025-01-10 13:38:43 +00:00
Lukas Wirth
bf669dab84 Re-implement rust string highlighting via tool attribute 2025-01-10 13:49:35 +01:00
Lukas Wirth
897f7e579e
Merge pull request #18904 from Veykril/push-yztnorquuyzw
Improve hover module path rendering
2025-01-10 11:53:38 +00:00
Lukas Wirth
67fd72d5ee
Merge pull request #18903 from Veykril/push-mqmworppxuyw
Implement implicit sized bound inlay hints
2025-01-10 11:53:18 +00:00
Lukas Wirth
d4fa92e80a Implement implicit sized bound inlay hints 2025-01-10 12:38:21 +01:00
Lukas Wirth
3bae1f0a1b Improve hover module path rendering 2025-01-10 12:36:55 +01:00
Lukas Wirth
1b52a6680f
Merge pull request #18900 from ChayimFriedman2/stupid-hang
fix: Do not compute `prettify_macro_expansion()` unless the "Inline macro" assist has actually been invoked
2025-01-10 11:02:54 +00:00
Lukas Wirth
6f04f373d7
Merge pull request #18902 from Veykril/push-znlsxykqrkoo
internal: Add Definition::Crate
2025-01-10 10:01:43 +00:00
Lukas Wirth
e6270bd378 internal: Add Definition::Crate
This is its own thing so it should be handled specifically where possible
2025-01-10 10:45:44 +01:00
Lukas Wirth
89b37675d7
Merge pull request #18901 from ChayimFriedman2/hir-reexport
minor: Remove two hir reexports
2025-01-10 06:57:18 +00:00
Lukas Wirth
d133136bc4
Merge pull request #18813 from Giga-Bowser/syntax-tree-view
feat: Add a new and improved syntax tree view
2025-01-10 06:56:34 +00:00
Lukas Wirth
b75a96915e
Merge pull request #18899 from ChayimFriedman2/issue-18898
fix: Fix another issue with fixup reversing
2025-01-10 06:55:45 +00:00
Chayim Refael Friedman
87f7a5849c Remove two hir reexports 2025-01-10 03:19:28 +02:00
Chayim Refael Friedman
52794d5194 Do not compute prettify_macro_expansion() unless the "Inline macro" assist has actually been invoked
And not just called to be listed.

This was a major performance hang when repeatedly switching back-and-forth between a large `include!`d file (but there are others)..
2025-01-10 00:56:00 +02:00
Giga Bowser
c0f22c7e9d Add an action to copy an element from the syntax tree view 2025-01-09 14:03:18 -06:00
Chayim Refael Friedman
bbcb71a403 Fix another issue with fixup reversing
We need to *remove* the whole subtree, but we don't advance `i` by this, because it hasn't gotten there yet (and never will).
2025-01-09 22:02:44 +02:00
Giga Bowser
cb5ce9eaa6 Remove the old syntax tree viewer 2025-01-09 13:20:06 -06:00
Giga Bowser
5ffe45d8cd Add a new and improved syntax tree viewer 2025-01-09 13:20:06 -06:00
Lukas Wirth
cc016df54b
Merge pull request #18889 from ChayimFriedman2/subtle-completion
fix: Fix actual token lookup in completion's `expand()`
2025-01-09 12:12:38 +00:00
Lukas Wirth
2e234e3d1b
Merge pull request #18880 from PrototypeNM1/extra-includes
Add config setting which allows adding additional include paths to the VFS.
2025-01-09 10:24:51 +00:00
Lukas Wirth
3fe50ef83c
Merge pull request #18861 from ChayimFriedman2/await-edition
fix: Make edition per-token, not per-file
2025-01-09 10:20:11 +00:00
Lukas Wirth
5c106b4efa
Merge pull request #18885 from qjerome/refactor-cargo-cfgs
refactor: struct holding cargo cfgs settings
2025-01-09 10:19:55 +00:00
Lukas Wirth
547d511ee1
Merge pull request #18890 from Veykril/push-nwnozlyppvzo
minor: Fixup macro error kinds
2025-01-09 08:54:05 +00:00
Lukas Wirth
646e96f68d minor: Fixup macro error kinds 2025-01-09 09:38:58 +01:00
Lukas Wirth
d3a49d3783
Merge pull request #18887 from vishruth-thimmaiah/refactor_completions_tests
refactor test helpers within ide-completions
2025-01-09 08:15:53 +00:00
Lukas Wirth
1e9c7dd7ee
Merge pull request #18524 from Giga-Bowser/migrate-wrap-unwrap-return
internal: Migrate `(un)wrap_return_type` assists to use `SyntaxEditor`
2025-01-09 07:05:48 +00:00
Chayim Refael Friedman
97afb7bfba Make edition per-token, not per-file
More correctly, *also* per-token. Because as it turns out, while the top-level edition affects parsing (I think), the per-token edition affects escaping of identifiers/keywords.
2025-01-09 05:43:08 +02:00
Chayim Refael Friedman
0c77bce011 Fix actual token lookup in completion's expand()
It should be left biased, not right biased, because when e.g. the use has typed `h` then requested completion, the `h` is what we want to find, not the next token (which might indeed be inside a macro call).

I'm not sure why I wrote `right_biased()` to begin with (I remember I had a reason and not just "both should work"), I might've copied the code in `expand_and_analyze()` (which is wrong, because there it lookups on the speculative file, where right biased will always find the correct token and left biased not).

This is still not perfect, because there might not be an identifier already typed then we might still end up in a macro call, but this is the best we can do.
2025-01-09 05:22:14 +02:00
Giga Bowser
c552f72f6a minor: Use placeholders in unwrap_return_type 2025-01-08 18:12:06 -06:00
Giga Bowser
a5a79f5957 internal: Migrate unwrap_return_type assist to use SyntaxEditor
Also changes `make::expr_empty_block()` to return `ast::BlockExpr` instead of `ast::Expr`
2025-01-08 18:12:06 -06:00
Giga Bowser
651b43e551 internal: Migrate wrap_return_type assist to use SyntaxEditor 2025-01-08 15:19:10 -06:00
Nicholas Rishel
1f9686993a Add config setting which allows adding additional include paths to the VFS. 2025-01-08 10:57:46 -08:00
Vishruth-Thimmaiah
b21a5f83d2
refactor test helpers within ide-completions 2025-01-08 23:51:18 +05:30
qjerome
cc7fb1945d
fix: requested changed 2025-01-08 14:47:46 +01:00
qjerome
e9a13ab6d7
fix: autogenerate files 2025-01-08 14:47:21 +01:00
qjerome
1c5a125beb
refactor: struct holding cargo cfgs settings 2025-01-08 11:20:08 +01:00
Lukas Wirth
32b86a8378
Merge pull request #18884 from Veykril/push-xwqkorxozzkq
fix: Fix `env`/`option_env` macro check disregarding macro_rules definitions
2025-01-08 10:14:51 +00:00
Lukas Wirth
acccd4bde6 fix: Fix env/option_env macro check disregarding macro_rules definitions 2025-01-08 10:59:58 +01:00
Lukas Wirth
1e975d6ee4
Merge pull request #18855 from Giga-Bowser/migrate-if-let
internal: Migrate `if let` replacement assists to `SyntaxEditor`
2025-01-08 08:59:42 +00:00
Laurențiu Nicola
f2a7136544
Merge pull request #18882 from lnicola/publish-test-fixture
minor: Fix `test-fixture` autopublishing
2025-01-08 08:34:41 +00:00
Laurențiu Nicola
8eb5d3c6f3 Fix test-fixture autopublishing 2025-01-08 10:19:46 +02:00
Laurențiu Nicola
238ccb628b
Merge pull request #18877 from ChayimFriedman2/crazy-hang
fix: Fix a bug with missing binding in MBE
2025-01-08 06:53:07 +00:00
Chayim Refael Friedman
0d4af7bce3 Fix a bug with missing binding in MBE
We should immediately mark them as finished, on the first entry.

The funny (or sad) part was that this bug was pre-existing, but previously to #18327, it was causing us to generate bindings non-stop, 65535 of them, until we get to the hardcoded repetition limit, and then throw it all away. And it was so Blazingly Fast that nobody noticed.

With #18327 however, this is still what happens, except that now instead of *merging* the fragments into the result, we write them on-demand. Meaning that when we hit the limit, we've already written all previous entries. This is a minor change, I thought for myself when I was writing this, and it's actually for the better, so who cares. Minor change? Not so fast. This caused us to emit 65535 repetitions, all of which the MBE infra needs to handle when calling other macros with the expansion, and convert to rowan tree etc., which resulted a *massive* hang.

The test (and also `analysis-stats`) used to crash with stack overflow on this macro, because we were dropping some crazily deep rowan tree. Now they work properly. Because I am lazy, and also because I could not find the exact conditions that causes a macro match but with a missing binding, I just copied all macros from tracing. Easy.
2025-01-07 23:04:53 +02:00
Laurențiu Nicola
91fc0a239a
Merge pull request #18874 from lnicola/sync-from-rust
minor: Sync from downstream
2025-01-07 16:13:25 +00:00
Laurențiu Nicola
f5e698d0b0 Merge from rust-lang/rust 2025-01-07 17:57:53 +02:00
Laurențiu Nicola
f8fce005d7 Preparing for merge from rust-lang/rust 2025-01-07 17:57:18 +02:00