Lukas Wirth
d5faad1dae
Fix inlay-hint tests being invalidated by minicore chanes
2023-11-14 18:53:48 +01:00
Lukas Wirth
6ddccc9a6e
Diagnose some orphan trait impl cases
2023-11-14 18:09:34 +01:00
Lukas Wirth
e844784d8d
Simplify
2023-11-14 12:53:14 +01:00
Lukas Wirth
ba61766217
Add config for preferring / ignoring prelude modules in find_path
2023-11-11 14:56:38 +01:00
YangzeLuo
41bcd542e2
feat: preview adt field when hover
2023-11-08 21:45:32 +08:00
hkalbasi
8b82ea4f51
Store binding mode for each instance independently
2023-10-22 23:35:33 +03:30
bors
bd38871a98
Auto merge of #15736 - rmehri01:15678_module_incorrect_case_diagnostics, r=HKalbasi
...
fix: add incorrect case diagnostics for module names
Adds diagnostics for checking both inline and file module names are snake case.
Closes #15678
2023-10-20 16:20:40 +00:00
Lukas Wirth
40acc5250f
Update rustc_abi dependency
2023-10-15 18:57:40 +02:00
Ryan Mehri
36eac9abee
fix: add incorrect case diagnostics for module names
2023-10-09 13:36:39 -07:00
Lukas Wirth
88a00bf49d
Shrink PatPtr by swapping its AstPtr and Either wrap order
2023-10-06 12:32:37 +02:00
Lukas Wirth
fe398163b6
Recognize custom main function as binary entrypoint for runnables
2023-10-04 12:07:41 +02:00
hkalbasi
7834b8fadb
Add unused_variables
native diagnostic
2023-09-24 21:29:15 +03:30
bors
4a8622c8fa
Auto merge of #15652 - Veykril:format_to, r=lnicola
...
minor: Various small fixes
2023-09-22 09:06:06 +00:00
Lukas Wirth
556f0c6704
Various small fixes
2023-09-22 10:13:51 +02:00
Maybe Waffle
a219dbda2b
Remove most of the duplication from Semantics{,Impl}
via deref
2023-09-13 22:02:28 +00:00
Lukas Wirth
affe5a7315
fix: Temporarily skip decl check in derive expansions
2023-09-12 23:10:03 +02:00
Lukas Wirth
8f5fee4a5a
Diagnose incorrect and private fields in record structs
2023-09-09 10:45:29 +02:00
Lukas Wirth
55c75450fb
Diagnose private fields in record constructor
2023-09-08 23:19:30 +02:00
Lukas Wirth
8654a098c7
Diagnose mismatched arg count for tuple struct patterns
2023-09-08 14:54:43 +02:00
Lukas Wirth
8eddc64f86
Simplify
2023-09-02 17:12:57 +02:00
Lukas Wirth
b1575528c0
Move doc comment handling into ide-db
2023-09-02 16:27:26 +02:00
Lukas Wirth
0bf0563a00
Add a few more db.unwind_if_cancelled()
calls
2023-09-02 14:39:19 +02:00
Jessie Chatham Spencer
37e0e8af10
Implement extern crate completion
2023-08-20 16:36:59 +00:00
Lukas Wirth
eb6244c5f9
Record import aliases in symbol index
2023-08-18 11:46:35 +02:00
Lukas Wirth
637f496a81
fix: Fix auto-import (and completions) importing #[doc(hidden)]
items
2023-08-17 12:30:19 +02:00
bors
49716e681a
Auto merge of #15472 - Veykril:import-ide-support, r=Veykril
...
internal: Record import origins in ItemScope and PerNS
This records the import items definitions come from in the module scope (as well as what an import resolves to in an ItemScope). It does ignore glob imports as thats a lot more work for little to no gain, glob imports act as if the importing items are "inlined" into the scope which suffices for almost all use cases I believe (to my knowledge, attributes on them have little effect).
There is still a lot of work needed to make this available to the IDE layer, but this lays out the ground work for havin IDE layer support.
cc https://github.com/rust-lang/rust-analyzer/issues/14079
2023-08-17 09:56:42 +00:00
Lukas Wirth
a17d73ad36
Thread imports through the resolver
2023-08-17 10:52:13 +02:00
Lukas Wirth
53b292478d
internal: Add offset param to token descending API
2023-08-16 10:07:18 +02:00
ponyii
fec5ff9890
start hovering default values of generic constants
2023-08-15 20:26:42 +04:00
bors
b771de3fdc
Auto merge of #15179 - ponyii:fix/default-values-of-const-params-are-ignored, r=HKalbasi
...
the "add missing members" assists: implemented substitution of default values of const params
To achieve this, I've made `hir::ConstParamData` store the default values
2023-08-15 10:17:43 +00:00
bors
0fa822dfe1
Auto merge of #15418 - oxalica:fix/sig-from-macro, r=Veykril
...
Fix signature help of methods from macros
Currently the receiver type is copied from AST instead re-formatting through `HirDisplay`. Macro generated functions seem to have no spaces and their signature help are rendered like `fn foo(&'amutself)` instead of `fn foo(&'a mut self)`.
2023-08-15 06:25:13 +00:00
Lukas Wirth
9adff006e8
Simplify
2023-08-10 20:10:19 +02:00
bors
ddbbd6a7e7
Auto merge of #15417 - lowr:patch/purge-generic-arg-data-in-expr, r=HKalbasi
...
internal: use `Cast::cast()` instead of explicit interning
I firmly believe that we should generally use `cast()` instead of interning `GenericArgData` to construct `GenericArg` because it's less verbose and more readable.
2023-08-08 19:27:18 +00:00
oxalica
de86444756
Prefer hir::SelfParam
and fix signature help of methods from macros
2023-08-09 02:42:08 +08:00
oxalica
6a2f83a8a2
Impl HirDisplay
for SelfParam
2023-08-09 02:26:44 +08:00
ponyii
e4c45427dc
refactoring
2023-08-08 21:57:55 +04:00
ponyii
4ebdc6f052
syntax update: the default value of ConstParam
turned from Expr
into ConstArg
2023-08-08 21:57:54 +04:00
ponyii
52b4392724
the "add missing members" assists: implemented substitution of default values of const params
2023-08-08 21:57:54 +04:00
Ryo Yoshida
6aa03c5d15
Use Cast::cast()
instead of interning GenericArgData
2023-08-09 00:47:29 +09:00
Ryo Yoshida
0c433c23b1
Support doc links that resolve to fields
2023-08-07 00:59:35 +09:00
Lukas Wirth
ecb6d07d57
Add currently unused UseId variants
2023-08-02 14:53:45 +02:00
Lukas Wirth
6e2c3f610b
Remove suspicious unwrap
2023-08-02 12:18:10 +02:00
Lukas Wirth
bcff166b3a
Add ExternCrateDecl to HIR
2023-08-02 11:52:55 +02:00
bors
59d35d24a7
Auto merge of #15320 - lowr:fix/incorrect-name-case-for-inner-items, r=HKalbasi
...
Report `incorrect-ident-case` for inner items
Fixes #15319
Although we have been collecting the diagnostics for inner items within function bodies, we were discarding them and never reported to the users. This PR makes sure that they are all reported and additionally collects the diagnostics for inner items within const bodies, static bodies, and enum variant bodies.
2023-07-21 06:41:30 +00:00
Ryo Yoshida
b53a07835b
Report incorrect case for fn inner items
2023-07-21 15:07:49 +09:00
hkalbasi
eb143383c3
Pass TraitEnvironment
into layout_ty
and const_eval
2023-07-20 13:08:38 +03:30
Lukas Wirth
6a7b905c86
Fix the eager token maps by re-mapping the textranges between the input and input expansion
2023-07-13 09:22:38 +02:00
Lukas Wirth
d5f64f875a
Infallibe ExpandDatabase::macro_def
2023-07-10 16:23:29 +02:00
hkalbasi
f0ba0dbe8a
Use debug impl in rendering const eval result
2023-07-08 01:07:38 +03:30
hkalbasi
4a444e768c
Implement recursion in mir interpreter without recursion
2023-07-07 15:07:29 +03:30