Kirill Bulatov
690cd95327
Reduce fst_path calls
2021-06-11 00:10:09 +03:00
Kirill Bulatov
3aaf07b8cb
Add more profiling for flyimports
2021-06-10 23:43:46 +03:00
Lukas Wirth
ae8d74ab2c
Implement dummy expansions for builtin attributes
2021-06-09 18:27:08 +02:00
bors[bot]
2f376f7475
Merge #9169
...
9169: internal: steps towards attribute macro token mapping r=jonas-schievink a=jonas-schievink
This doesn't work yet, but we seem to be getting a bit further along (for example, we now stop highlighting `use` items inside item with attribute macros as if they were written verbatim).
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-06-07 17:37:48 +00:00
Laurențiu Nicola
15dd475988
Make Documentation::new non-generic
2021-06-07 12:58:51 +03:00
Jonas Schievink
8d87f9b298
Handle attribute macros in descend_into_macros
2021-06-06 17:03:37 +02:00
Lukas Wirth
7524850831
Render documentation for derive completion
2021-06-04 20:58:12 +02:00
Jonas Schievink
20de86d014
Return ReachedFixedPoint::No
when resolving derive helper
2021-06-04 16:50:35 +02:00
Jonas Schievink
d1c4d28eed
Update list of built-in attributes
2021-06-03 18:09:21 +02:00
Jonas Schievink
9fdb8f9037
Make it opt-in
2021-06-03 18:09:21 +02:00
Jonas Schievink
e5a2c6596d
Expand procedural attribute macros
2021-06-03 18:09:21 +02:00
Matthias Krüger
9452dfaac7
NFC: remove redundant clones (clippy::perf)
2021-06-03 15:32:46 +02:00
Jonas Schievink
28e3e683b2
ItemTree: make variant fields inherit the enum's visibility
2021-06-03 14:26:26 +02:00
Jonas Schievink
70e19fd1cb
Add comment
2021-06-03 13:51:43 +02:00
Jonas Schievink
955064b6aa
Implement #[rustc_skip_array_during_method_dispatch]
2021-06-01 21:34:08 +02:00
Jonas Schievink
41321fa71d
Fall back to legacy prelude
2021-06-01 19:03:00 +02:00
Jonas Schievink
f96c1a0414
Implement per-edition preludes
2021-06-01 13:39:19 +02:00
Dawer
e7c49666be
Expand fixme comments
2021-06-01 01:44:51 +05:00
Dawer
466345ca81
Clean up, more docs.
2021-06-01 00:08:27 +05:00
Dawer
678d85ca7e
Implement struct ctor application
2021-06-01 00:03:46 +05:00
bors[bot]
e9a797748d
Merge #8866
...
8866: Update salsa r=matklad a=jonas-schievink
This updates salsa to include https://github.com/salsa-rs/salsa/pull/265 , and removes all cancellation-related code from rust-analyzer
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-31 12:42:32 +00:00
Jonas Schievink
cb5454db86
Diagnose unimplemented built-in macros
2021-05-30 04:19:47 +02:00
Jonas Schievink
8c639a87bd
Thread proc-macro types through the HIR
2021-05-29 20:32:57 +02:00
cynecx
54d60fdee9
hir_ty: use async ret type for inference inside async bodies
2021-05-29 18:17:45 +02:00
Jonas Schievink
55f3ca2b74
Test that ItemTree
works as intended
2021-05-28 00:46:05 +02:00
Laurențiu Nicola
2268a220e4
Don't store supertraits in ItemTree
2021-05-27 16:52:30 +03:00
Jonas Schievink
33debc4065
Update salsa
2021-05-27 15:05:41 +02:00
Jonas Schievink
196cb65ead
Drop ignore
from doctests
2021-05-27 13:55:31 +02:00
Jonas Schievink
fe910c7bc4
Reduce memory usage a bit
2021-05-26 01:26:16 +02:00
Jonas Schievink
356dd3d909
Clean up ItemTree lowering now that it's 1:1
2021-05-26 01:09:31 +02:00
Jonas Schievink
b52df91877
Stop expanding UseTrees during ItemTree lowering
2021-05-26 01:01:58 +02:00
bors[bot]
5587d0a3e3
Merge #8973
...
8973: internal: move diagnostics to hir r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2021-05-25 20:33:21 +00:00
Aleksey Kladov
5c9f31d4c2
internal: move diagnostics to hir
...
The idea here is to eventually get rid of `dyn Diagnostic` and
`DiagnosticSink` infrastructure altogether, and just have a `enum
hir::Diagnostic` instead.
The problem with `dyn Diagnostic` is that it is defined in the lowest
level of the stack (hir_expand), but is used by the highest level (ide).
As a first step, we free hir_expand and hir_def from `dyn Diagnostic`
and kick the can up to `hir_ty`, as an intermediate state. The plan is
then to move DiagnosticSink similarly to the hir crate, and, as final
third step, remove its usage from the ide.
One currently unsolved problem is testing. You can notice that the test
which checks precise diagnostic ranges, unresolved_import_in_use_tree,
was moved to the ide layer. Logically, only IDE should have the infra to
render a specific range.
At the same time, the range is determined with the data produced in
hir_def and hir crates, so this layering is rather unfortunate. Working
on hir_def shouldn't require compiling `ide` for testing.
2021-05-25 17:49:59 +03:00
Lukas Wirth
28ca371755
Consider trait to be in scope for trait-impl
2021-05-25 16:16:29 +02:00
Florian Diebold
35c948ff4a
Fix lowering of FnOnce() without return type
...
This should result in an implicit `-> ()`, not leaving out the binding.
2021-05-25 14:29:53 +02:00
Jonas Schievink
31175a7f88
internal: intern AttrInput
2021-05-25 00:50:19 +02:00
Jonas Schievink
533e9207d3
Intern GenericArgs
...
This shaves off another ~4 mb or so
2021-05-24 15:35:46 +02:00
Jonas Schievink
8ebb8d29e1
internal: intern TypeBound
s
...
Doesn't save much memory (~2 mb), but interning things is generally a
good pattern to follow
2021-05-24 15:13:23 +02:00
bors[bot]
495c9586ec
Merge #8945
...
8945: fix: Make expected type work in more situations r=flodiebold a=flodiebold
Also makes call info show the correct types for generic methods.
![2021-05-23-182952_1134x616_scrot](https://user-images.githubusercontent.com/906069/119269023-dd5a5b00-bbf5-11eb-993a-b6e122c3b9a6.png )
![2021-05-23-183117_922x696_scrot](https://user-images.githubusercontent.com/906069/119269025-dfbcb500-bbf5-11eb-983c-fc415b8428e0.png )
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2021-05-23 21:55:51 +00:00
Jonas Schievink
693325fc39
internal: document ItemTree design
2021-05-23 23:09:38 +02:00
Florian Diebold
7a0c93c58a
Infer correct expected type for generic struct fields
2021-05-23 18:45:44 +02:00
Jonas Schievink
11825ac5fe
Explain why nested TypeRef
aren't interned
2021-05-23 16:28:23 +02:00
Jonas Schievink
15ff7faf3d
Render where clauses and more generic params
2021-05-23 02:51:58 +02:00
Jonas Schievink
380293d6c2
Pretty-print generic parameters
2021-05-23 01:15:26 +02:00
Jonas Schievink
c22ccd07fe
ItemTree: pretty-print all paths
2021-05-23 00:37:15 +02:00
Jonas Schievink
d077b8a7e0
Work around non-unique AttrIds
2021-05-22 02:30:03 +02:00
Jonas Schievink
8d13864440
Add an ItemTree pretty-printer
2021-05-21 23:45:27 +02:00
Jonas Schievink
01df4c04d1
impl Display for AttrInput/ImportAlias
2021-05-21 23:45:09 +02:00
Jonas Schievink
45f4a1e559
Remove StructDefKind
2021-05-21 21:08:06 +02:00
Jonas Schievink
d00bc9c2fc
Don't lower extern block in the ItemTree
2021-05-21 18:27:25 +02:00