Commit Graph

28174 Commits

Author SHA1 Message Date
Wyatt Herkamp
948a2dee09 Clippy Fix 2024-03-09 14:12:27 -05:00
Wyatt Herkamp
79f2651262 Add cfg_attr and cleanup code 2024-03-09 13:25:56 -05:00
bors
574e23ec50 Auto merge of #16794 - HKalbasi:test-explorer, r=lnicola
Some minor changes in the test explorer lsp extension

followup #16662

cc `@nemethf` `@ShuiRuTian`
2024-03-09 10:01:41 +00:00
bors
8f08bbe637 Auto merge of #16795 - mu001999:master, r=Veykril
remove unused struct Snap in lsif

Detected by #121752, see https://github.com/rust-lang/rust/pull/121752#issuecomment-1986378328
2024-03-09 06:30:07 +00:00
r0cky
79508d909a remove unused struct Snap in lsif 2024-03-09 09:09:27 +08:00
hkalbasi
dc99ad912a Some minor changes in the test explorer lsp extension 2024-03-09 01:21:27 +03:30
Laurențiu Nicola
a12ccd5923 Fix test 2024-03-08 20:39:47 +02:00
Laurențiu Nicola
0f43b55e83 Stop using an Arc when setting the file text 2024-03-08 20:30:12 +02:00
Laurențiu Nicola
02b6c181dd Compress file text using lz4 in salsa 2024-03-08 20:22:08 +02:00
Wyatt Herkamp
f45b080965 Starting Fix for cfg stripping 2024-03-08 11:10:29 -05:00
bors
2397e7a887 Auto merge of #16787 - pksunkara:remove-macro-call-check, r=lnicola
Remove unncessary check for macro call

Since `macro_rules` is a contextual keyword, it is an `IDENT` token and thus `is_path_start` already identifies it correctly. You can tell the previous check is unnecessary because the relevant tests still pass.
2024-03-08 13:23:31 +00:00
bors
2b7b44bf27 Auto merge of #16786 - pksunkara:improve-readability, r=lnicola
internal: Improve readability of the parser code

The code is basically equivalent to the previous version, but it improves the readability by making it much more simpler and concise.
2024-03-08 12:21:18 +00:00
bors
1487bc2af6 Auto merge of #16785 - pksunkara:remove-crate-visibility-recovery, r=lnicola
internal: Remove unused keyword from visibility recovery

We removed support `crate` visibility keyword, but forgot to remove it from the recovery token list.
2024-03-08 12:08:06 +00:00
Pavan Kumar Sunkara
a838e44032 Remove unncessary check for macro call 2024-03-08 12:03:35 +00:00
Pavan Kumar Sunkara
2a41b2cd94 Improve readability of the parser code 2024-03-08 12:00:24 +00:00
Pavan Kumar Sunkara
b37ccfce44 Remove unused keyword from visibility recovery 2024-03-08 11:53:03 +00:00
bors
00a0125372 Auto merge of #16782 - DropDemBits:format-string-exprs-comments, r=Veykril
fix: Preserve $ and \ in postfix format completions

`parse_format_exprs` doesn't escape these two as of #16781, so they have to be escaped as a separate step.
2024-03-08 08:23:04 +00:00
DropDemBits
bc381837e3
fix: Preserve $ and \ in postfix format completions
`parse_format_exprs` doesn't escape these two anymore, so they have to be escaped as a separate step.
2024-03-07 16:55:09 -05:00
DropDemBits
7dadc64d1c
minor: Update comments in format_string_exprs
`parse_format_exprs` no longer handles escaping `$` and `\`
2024-03-07 16:08:20 -05:00
bors
48cb059182 Auto merge of #16781 - DropDemBits:extract-format-args-escaping, r=Veykril
fix: Don't escape `\` and `$` in "Extract format expressions" assist

Fixes #16745
2024-03-07 20:04:33 +00:00
DropDemBits
1f37e5ac9a
fix: Don't escape \ and $ in "Extract format expressions" assist 2024-03-07 14:20:23 -05:00
bors
7f19beb9b4 Auto merge of #16779 - lnicola:skip-unknown-types-match-diagnostics, r=Veykril
minor: Skip match diagnostics for partially unknown types

CC https://github.com/rust-lang/rust-analyzer/issues/16746#issuecomment-1981071008
2024-03-07 17:26:16 +00:00
Laurențiu Nicola
cd2347e132 Skip match diagnostics for partially unknown types 2024-03-07 19:11:23 +02:00
bors
bbb441ec6d Auto merge of #16778 - Nadrieril:update-pat-ana, r=lnicola
Update `rustc_pattern_analysis` to 0.42.0

There was an important API change in 0.41.0, and (hopefully) a fix for https://github.com/rust-lang/rust-analyzer/issues/16774 in 0.42.0.
2024-03-07 16:22:26 +00:00
Nadrieril
e31484c108 Update the other crates too 2024-03-07 16:44:46 +01:00
Nadrieril
1b0b4220fd Update rustc_pattern_analysis to 0.42.0 2024-03-07 16:33:31 +01:00
bors
b1f6d56e44 Auto merge of #16777 - Veykril:body-invalid, r=Veykril
fix: Don't invalid body query results when generating desugared names

The hack remains until we get hygiene, but with this the generated names are stable across bodies
2024-03-07 14:21:26 +00:00
Lukas Wirth
09b9a921a8 fix: Don't invalid body query results when generating desugared names 2024-03-07 15:03:16 +01:00
bors
e101f24798 Auto merge of #16776 - Veykril:parse-macro-parse, r=Veykril
fix: Don't force draw a dependency edge to the real_span_map query

This can cause extra invalidations as like direct `AstIdMap` dependencies
2024-03-07 13:19:36 +00:00
Lukas Wirth
c04c0dd5ba fix: Don't force draw a dependency edge to the real_span_map query 2024-03-07 14:14:59 +01:00
bors
0ffc1ef115 Auto merge of #16775 - Veykril:parse-macro-parse, r=Veykril
fix: Remove accidental dependency between `parse_macro_expansion` and `parse`

Turns out my idea from https://github.com/rust-lang/rust-analyzer/pull/15251 causes all builtin derive expansions to obviously rely on the main parse, meaning the entire `macro_arg` layer becomes kind of pointless. So this reverts that PR again.
2024-03-07 10:47:35 +00:00
bors
a1fda6476c Auto merge of #16742 - alibektas:13529/source_root_tree, r=Veykril
internal: Implement parent-child relation for `SourceRoot`s

This commit adds the said relation by keeping a map of type `FxHashMap<SourceRootId,Option<SourceRootId>>` inside the `GlobalState`. Its primary use case is reading `rust-analyzer.toml`(#13529)  files that can be placed in every local source root. As a config will be found by traversing this "tree" we need the parent information for every local source root. This commit omits defining this relation for library source roots entirely.
2024-03-07 10:30:08 +00:00
bors
00f6a7aced Auto merge of #16772 - Veykril:salsa-tracing, r=Veykril
internal: Add tracing spans to macro generated database
2024-03-07 10:16:53 +00:00
Lukas Wirth
bd0ffb0248 Remove accidental dependency between parse_macro_expansion and parse 2024-03-07 11:16:40 +01:00
Lukas Wirth
9c2fa76c84 Dedup hprof stuff 2024-03-07 10:21:50 +01:00
Lukas Wirth
09d33f3e1e Add diagnostics integrated benchmark 2024-03-07 09:33:48 +01:00
Lukas Wirth
a3b6e891ea Add tracing spans to macro generated database 2024-03-06 20:19:36 +01:00
Ali Bektas
9c50d129da Opt for FxHashMap<Id,Id> instead of <Id,Option<Id>> and apply requested changes 2024-03-06 19:55:04 +01:00
Ali Bektas
a15cc86c64 Implement parent-child relation for SourceRoots
This commit adds the said relation by keeping a map of type `FxHashMap<SourceRootId,Option<SourceRootId>>`
inside the `GlobalState`. Its primary use case is reading the rust-analyzer.toml files that can be
placed under every local source root. As a config will be found by traversing this "tree" we need the parent information
for every local source root. This commit omits defining this relation for library source roots entirely.
2024-03-06 19:55:04 +01:00
bors
ce15e73a8e Auto merge of #16773 - Veykril:text-explorer, r=Veykril
fix: Add config and capability for test explorer
2024-03-06 18:26:40 +00:00
Lukas Wirth
1c6d1b4f2a fix: Add config and capability for test explorer 2024-03-06 19:20:58 +01:00
Wyatt Herkamp
4f0bc1a314 Typo 2024-03-06 11:51:45 -05:00
Wyatt Herkamp
255ba692aa Added tests, added Union Support, and code cleanup 2024-03-06 10:55:47 -05:00
bors
e5889c9b43 Auto merge of #16770 - roife:fix-issue-16278, r=Veykril
fix: panic when using float numbers without dots in chain calls

Fix #16278.

This PR fixes the panic caused by using floating-point numbers without a dot (such as `1e2`) in chain calls.

-------------

Although this syntax is very odd 🤣, r-a should not panic.
2024-03-06 15:38:35 +00:00
roife
91d181feff minor: fmt and clippy 2024-03-06 23:32:40 +08:00
roife
e2daee61bc test: add test for float_split_scientific_notation 2024-03-06 22:51:22 +08:00
roife
03420c330e fix: panic when split float numbers in scientific notation 2024-03-06 22:50:50 +08:00
bors
b85d38f7d6 Auto merge of #16755 - Veykril:rustup-bins, r=Veykril
For toolchain binaries use the full path found in $PATH

Fixes https://github.com/rust-lang/rust-analyzer/issues/16754
2024-03-06 14:47:32 +00:00
bors
1a55ab30f6 Auto merge of #16769 - ShoyuVanilla:issue-15412, r=Veykril
fix: Function argument type inference with associated type impl trait

Fixes #15412
2024-03-06 12:51:10 +00:00
Shoyu Vanilla
a8f56112ea fix: Function argument type inference with associated type impl trait 2024-03-06 21:16:41 +09:00