Commit Graph

25634 Commits

Author SHA1 Message Date
Lukas Wirth
c3186202a2 Shrink size of hir::Binding 2023-06-18 12:03:04 +02:00
bors
5dccf3010b Auto merge of #15075 - Veykril:bindings, r=Veykril
fix: Add binding definition for for-expr iterator desugared binding
2023-06-18 09:45:49 +00:00
Lukas Wirth
83d7724629 fix: Add binding definition for for-expr iterator desugared binding 2023-06-18 11:44:01 +02:00
bors
a1b536ec6f Auto merge of #15054 - ponyii:fix/implement-missing-members-do-not-transform-const-params, r=lowr
fix: implement missing members doesn't transform const params and default types

Fixes https://github.com/rust-lang/rust-analyzer/issues/13363
2023-06-18 09:30:13 +00:00
Ali Bektas
4ed1197662 Version 3
Remove scope_for_def calls as the definition have been removed entirely.
As a result of this change the problem with false path resolutions has been solved.
2023-06-17 21:27:52 +02:00
Ali Bektas
19a9de72f6 Version 2 2023-06-17 13:52:34 +02:00
Ali Bektas
59cc783a3b Correct errors produced by CI 2023-06-17 13:52:34 +02:00
Ali Bektas
8123a39c82 Generate delegate trait 2023-06-17 13:52:34 +02:00
Lukas Wirth
a824b734dd Report metric timings for file item trees and crate def map creation 2023-06-17 11:20:21 +02:00
Lukas Wirth
58ac823864 Less eager parsing for module sources 2023-06-17 10:58:52 +02:00
bors
fcfc6afe05 Auto merge of #15069 - Veykril:analysis-stat-stuff, r=Veykril
analysis-stats: Add body lowering step, track time of each step separtely
2023-06-17 08:58:10 +00:00
Lukas Wirth
b5e0452c71 Lazy progress reporting 2023-06-17 10:34:44 +02:00
Lukas Wirth
64a8887a94 Add body lowering step, track time of each step separtely 2023-06-17 09:55:48 +02:00
bors
fdba1b6a5c Auto merge of #15066 - Veykril:analysis-stats, r=Veykril
internal: Analyze all bodies in analysis-stats, not just functions
2023-06-17 07:09:50 +00:00
bors
a5a71c75e6 Auto merge of #15067 - Veykril:loop-turn-msgh, r=Veykril
internal: Add more context to overly long loop turn message
2023-06-16 17:31:37 +00:00
Lukas Wirth
bd762e62df internal: Add more context to overly long loop turn message 2023-06-16 19:31:07 +02:00
Lukas Wirth
76acf3b992 internal: Analyze all bodies in analysis-stats, not just functions 2023-06-16 19:14:46 +02:00
bors
4143890316 Auto merge of #15065 - Veykril:remove-alloc, r=Veykril
internal: Do not allocate unnecessarily when importing macros from parent modules
2023-06-16 16:42:01 +00:00
Lukas Wirth
bd093d1ccd Sort methods in generate_delegate_methods listing 2023-06-16 18:41:25 +02:00
Lukas Wirth
3484b5a116 internal: Do not allocate unnecessarily when importing macros from parent modules 2023-06-16 18:41:06 +02:00
ponyii
7e08933a26 the "implement missing members" assist's const transformation patched 2023-06-16 20:34:44 +04:00
bors
0cad484a94 Auto merge of #14693 - HKalbasi:pointee-trait, r=HKalbasi
Support `Pointee` trait

fix #13992
2023-06-16 14:34:11 +00:00
hkalbasi
527dfede48 Support Pointee trait 2023-06-16 16:43:43 +03:30
bors
689f964f5f Auto merge of #15062 - AlPha5130:master, r=lnicola
doc: remove duplicated words
2023-06-16 10:27:46 +00:00
MysticNebula70
8cc55bfee6 doc: remove duplicated words 2023-06-16 18:22:43 +08:00
ponyii
8a3c21442e refactoring 2023-06-15 17:56:08 +04:00
bors
ff864fbb9f Auto merge of #15058 - HKalbasi:more-log, r=HKalbasi
Add more log in "terminator is none" assert

cc #15029
2023-06-15 08:36:08 +00:00
hkalbasi
922be8714d Add more log in "terminator is none" assert 2023-06-15 12:05:15 +03:30
hkalbasi
e55a1f1916 Map our diagnostics to rustc and clippy's ones 2023-06-15 01:47:22 +03:30
bors
9c967d3809 Auto merge of #15053 - Veykril:crate-root-module-id, r=Veykril
internal: Add a CrateRootModuleId that encodes a module id that is always a crate root
2023-06-14 14:41:06 +00:00
Lukas Wirth
cf178cba8f internal: Add a CrateRootModuleId that encodes a module id that is always a crate root 2023-06-14 15:41:06 +02:00
ponyii
b07490ffe9 made the add_missing_impl_members and add_missing_default_members assists transform default generic types 2023-06-14 17:37:34 +04:00
bors
51939db8d3 Auto merge of #15052 - lnicola:fmt-arguments, r=Veykril
minor: Rename minicore ArgumentV1 to match libcore
2023-06-14 12:13:58 +00:00
Laurențiu Nicola
6d6354e5b5 Rename minicore ArgumentV1 to match libcore 2023-06-14 07:33:37 +03:00
bors
f8dec25bd7 Auto merge of #15047 - Veykril:crate-graph-root-deps, r=Veykril
internal: Record file dependencies in crate graph construction

Should fix the bug mentioned in https://github.com/rust-lang/rust-analyzer/issues/8623 where removing a crate root file will panic. I'm not too happy with the way this is done here but I can't think of a better way right now.
2023-06-13 10:56:51 +00:00
Lukas Wirth
b322805918 internal: Record file dependencies in crate graph construction 2023-06-13 12:29:24 +02:00
bors
25f1c728b4 Auto merge of #15044 - lowr:fix/deduplicate-compl-fields, r=lnicola
Deduplicate tuple indices for completion

Follow-up to #15026

A tuple struct may dereference to a primitive tuple (though unusual, which is why I previously overlooked this case). We should not show the same tuple index in completion in such cases.

Deduplication of indices among multiple tuple structs is already handled in the previous PR.
2023-06-13 09:20:41 +00:00
Ryo Yoshida
d01283b1f7
Deduplicate tuple indices for completion 2023-06-13 18:01:54 +09:00
bors
07bc6cbcad Auto merge of #15040 - lnicola:hash-state-name, r=Veykril
fix: Use a more obscure hasher name in derive expansion

Closes #15039
2023-06-13 06:13:35 +00:00
Laurențiu Nicola
0b441ca6a5 Use a more obscure hasher name in derive expansion 2023-06-13 08:50:27 +03:00
Raghul Nanth A
5d77839b25 style(metrics): Change spelling 2023-06-12 23:14:04 +05:30
bors
1f1fe81f0d Auto merge of #15036 - Veykril:const-param-intern-cleanup, r=Veykril
internal: Give ConstBlockId and InTypeConstId named Location types

cc https://github.com/rust-lang/rust-analyzer/pull/14932
2023-06-12 16:21:42 +00:00
Lukas Wirth
abe249559d internal: Give ConstBlockId and InTypeConstId named Location types 2023-06-12 18:21:17 +02:00
ponyii
5ce65a1d92 the "implement missing members" assist's const transformation implemented 2023-06-12 20:16:22 +04:00
bors
6b3659d38f Auto merge of #15026 - lowr:fix/deduplicate-compl-fields, r=Veykril
fix: deduplicate fields and types in completion

Fixes #15024

- `hir_ty::autoderef()` (which is only meant to be used outside `hir-ty`) now deduplicates types and completely resolves inference variables within.
- field completion now deduplicates fields of the same name and only picks such field of the first type in the deref chain.
2023-06-12 12:53:53 +00:00
bors
dcd31550e2 Auto merge of #14932 - HKalbasi:dev, r=HKalbasi
Lower const params with a bad id

cc #7434

This PR adds an `InTypeConstId` which is a `DefWithBodyId` and lower const generic parameters into bodies using it, and evaluate them with the mir interpreter. I think this is the last unimplemented const generic feature relative to rustc stable.

But there is a problem: The id used in the `InTypeConstId` is the raw `FileAstId`, which changes frequently. So these ids and their bodies will be invalidated very frequently, which is bad for incremental analysis.

Due this problem, I disabled lowering for local crates (in library crate the id is stable since files won't be changed). This might be overreacting (const generic expressions are usually small, maybe it would be better enabled with bad performance than disabled) but it makes motivation for doing it in the correct way, and it splits the potential panic and breakages that usually comes with const generic PRs in two steps.

Other than the id, I think (at least I hope) other parts are in the right direction.
2023-06-12 08:49:02 +00:00
bors
38c47dfe30 Auto merge of #15032 - AndreasBackx:fix/vscode-markdown, r=lnicola
fix: exclude Markdown injection grammar from .vscodeignore.

Enables Markdown injection introduced in #14866 but wasn't included in release due to the grammar file being ignored by `.vscodeignore`. I verified the fix by doing `vsce package` and installing it manually:

<img width="779" alt="image" src="https://github.com/rust-lang/rust-analyzer/assets/1593486/bb3da211-a017-45bf-ba7b-4122335aa6e8">

<img width="780" alt="image" src="https://github.com/rust-lang/rust-analyzer/assets/1593486/aa0c4025-e72c-4b0c-9d40-44c33e7d45e6">
2023-06-12 06:14:02 +00:00
Andreas Backx
942b392150
Exclude Markdown injection grammar from .vscodeignore.
Enables Markdown injection introduced in #14866 but wasn't included in release due to it being ignored.
2023-06-11 22:53:58 -07:00
hkalbasi
a4695788ca Add a bunch of fixme comments 2023-06-12 00:37:11 +03:30
Raghul Nanth A
f15e026101 ci(metrics): Run measurement functions in parallel
feat(xtask): Split metrics function
2023-06-12 01:22:34 +05:30