Chayim Refael Friedman
955e609867
Replace once_cell with std's recently stabilized OnceCell/Lock and LazyCell/Lock
...
This doesn't get rid of the once_cell dependency, unfortunately, since we have dependencies that use it, but it's a nice to do cleanup. And when our deps will eventually get rid of once_cell we will get rid of it for free.
2024-08-16 09:53:37 +03:00
Lukas Wirth
baa959fa99
Move lifetimes in front of type and const params but after self
2024-07-02 14:17:34 +02:00
Lukas Wirth
966798b7ba
Make GenericParams::lifetimes private
2024-07-02 13:45:53 +02:00
Lukas Wirth
be1ea4028b
Make GenericParams::where_predicates private
2024-07-02 13:45:50 +02:00
Lukas Wirth
372e2d22e6
Make GenericParams::type_or_consts private
2024-07-02 13:45:48 +02:00
Lukas Wirth
3168ab5b99
Enum variants are not generic def ids
2024-06-24 10:07:31 +02:00
Lukas Wirth
c01f4cf902
Simplify
2024-06-21 18:27:05 +02:00
Lukas Wirth
480bfd5a7d
There can only be one self param
2024-06-21 17:55:16 +02:00
Lukas Wirth
855282fa53
internal: Don't unnecessarily clone ModPaths in early name res
2024-06-12 11:25:19 +02:00
Wilfred Hughes
27182bb96b
chore: Prefer tracing span shorthand macros
2024-06-06 16:52:25 -07:00
Lukas Wirth
8241d8a0b8
fix: Fix implicit ty args being lowered where they shouldn't
2024-05-02 11:53:53 +02:00
dfireBird
40a677ddf0
implement creating generics for impl traits in associated types
2024-04-29 23:55:02 +05:30
Lukas Wirth
bfe59bbdc8
fix: Fix attributes on generic parameters colliding in item tree
2024-04-27 13:15:36 +02:00
Lukas Wirth
a82e028e30
Cleanup util::Generics method names
2024-04-06 14:29:40 +02:00
Lukas Wirth
707be6b99c
Adjust display impls to respect lifetime bounds
2024-04-02 14:51:08 +02:00
dfireBird
69c4ac6304
implement len and is_empty method in generic_params
2024-03-29 18:26:46 +05:30
dfireBird
0e54e2b55a
use references in Generics iter methods
2024-03-26 13:04:54 +05:30
dfireBird
a6c8cbfd91
update Generics
iter methods to return GenericParamId
2024-03-18 17:18:08 +05:30
dfireBird
f95b3d4cd2
implement resolving and lowering of Lifetimes
2024-03-18 17:18:06 +05:30
Lukas Wirth
dc69255b83
Re-organize hir-def/lib.rs
2024-02-10 12:40:23 +01:00
Lukas Wirth
74eb3ecbc1
Move ChildbySource and HasSource impls to their corresponding modules
2024-02-10 12:09:12 +01:00
Lukas Wirth
00303c3b67
Abstract over ItemTreeLoc
2024-02-10 11:37:59 +01:00
Lukas Wirth
2ebf0c87c2
Deduplicate some code
2024-02-10 01:51:22 +01:00
Tetsuharu Ohzeki
c6637f39c0
clippy: Enable borrowed_box
rule
2024-02-10 00:14:17 +09:00
David Barsky
e1ea7c8844
internal: switch to tracing
from log
...
This commit also adds `tracing` to NotificationDispatcher/RequestDispatcher,
bumps `rust-analyzer-salsa` to 0.17.0-pre.6, `always-assert` to 0.2, and
removes the homegrown `hprof` implementation in favor of a vendored
tracing-span-tree.
2024-01-30 12:27:31 -05:00
Johann Hemmann
c27b6b5308
filter_map_bool_then
2024-01-19 17:31:01 +01:00
Lukas Wirth
f8b130a6aa
unreachable pub
2024-01-09 21:35:22 +01:00
Lukas Wirth
06aaf20f10
Some minor perf improvements
2024-01-09 20:43:17 +01:00
Lukas Wirth
9083017c9d
Remove ModuleId
from TypeOwnerId
2023-12-14 14:11:57 +01:00
Lukas Wirth
9cb13b6efb
Allow navigation targets to be duplicated when the focus range lies in the macro definition site
2023-12-06 12:38:19 +01:00
Lukas Wirth
d2a31acda1
Fix macro expansion expression parenthesis wrapping
2023-12-02 13:03:46 +01:00
Lukas Wirth
890eb17b4e
Replace ID based TokenMap with proper relative text-ranges / spans
2023-11-28 10:55:39 +01:00
Lukas Wirth
e844784d8d
Simplify
2023-11-14 12:53:14 +01:00
ponyii
68e8379ec3
fixed a merge-caused error
2023-08-08 22:16:28 +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
Max Heller
50db877bfa
optimization and #[cfg] filtering for function generic params
2023-08-05 08:00:39 -04:00
Max Heller
3205ed7a41
simplify storing generic parameter attributes in item tree
2023-08-02 09:19:56 -04:00
Max Heller
008b639ef5
handle #[cfg]
s on generic parameters
2023-07-27 21:17:10 -04:00
hkalbasi
3a1054fc1c
Replace x
with it
2023-07-06 17:33:17 +03:30
Ryo Yoshida
f2a35deb50
Consider macro sub-namespace during name resolution
2023-05-11 21:13:12 +09:00
Laurențiu Nicola
7197a27028
Use triomphe Arc
2023-05-02 20:02:43 +03:00
Lukas Wirth
bca8029a6e
Move Expander and LowerCtx into separate modules
2023-04-17 20:44:06 +02:00
Lukas Wirth
d1632c2727
Report syntax errors from item level macro expansions
2023-04-16 17:22:06 +02:00
Lukas Wirth
f742943a4b
Don't recreate Hygiene unnecessarily
2023-04-06 21:16:11 +02:00
Lukas Wirth
a1b96b1e00
Remove unnecessary Names from FunctionData::params
2023-04-06 20:14:51 +02:00
Lukas Wirth
12b069f434
Move hir_def::keys to hir_def::dyn_map
2023-04-06 19:49:33 +02:00
Ryo Yoshida
29c957f973
Lower and handle trait aliases in HIR
2023-03-04 00:24:07 +09:00
Ryo Yoshida
e2ec3a6561
Refactor generic parameter lowering
...
Since we moved impl trait handling to other place, there are only two
cases now: those that introduce implicit `Self` parameter and those that
don't.
2023-03-04 00:24:05 +09:00
Lukas Wirth
68723043db
Split out hir-def attribute handling parts into hir-expand
2023-01-09 19:29:28 +01:00