Young-Flash
cfc881ae13
fix missing assoc item
2023-11-16 22:27:21 +08:00
bors
57ef70cc08
Auto merge of #15901 - Veykril:inner-diag, r=lnicola
...
fix: Diagnose everything in nested items, not just def diagnostics
Turns out we only calculated def diagnostics for these before (was wondering why I wasn't getting any type mismatches)
2023-11-15 10:07:15 +00:00
Lukas Wirth
498f39eae2
fix: Diagnose everything in nested items, not just def diagnostics
2023-11-15 10:34:09 +01:00
Laurențiu Nicola
6b53c09ef5
Merge branch 'master' into sync-from-rust
2023-11-15 09:46:27 +02:00
Laurențiu Nicola
610eafe009
Merge commit '76633199f4316b9c659d4ec0c102774d693cd940' into sync-from-rust
2023-11-15 09:45:17 +02:00
Lukas Wirth
723d799ec1
Diagnose missing assoc items in trait impls
2023-11-14 22:00:52 +01:00
Lukas Wirth
e21d21a8fb
Diagnose incorrect unsafety for trait impls
2023-11-14 21:05:27 +01:00
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
Laurențiu Nicola
b6951defa6
Add missing rustc_private features
2023-11-13 21:38:57 +02: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
Laurențiu Nicola
d1d111d09e
Merge commit '3b7c7f97e4a7bb253a8d398ee4f8346f6cf2817b' into sync-from-ra
2023-11-08 08:15:03 +02: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
Laurențiu Nicola
bcfc997eac
Merge commit '258b15c506a2d3ad862fd17ae24eaf272443f477' into sync-from-ra
2023-09-18 12:33:49 +03: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
Laurențiu Nicola
30d8aa1bec
Merge commit '9b3d03408c66749d56466bb09baf2a7177deb6ce' into sync-from-ra
2023-08-21 12:44:09 +03: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