Chayim Refael Friedman
4317927231
Avoid interior mutability in TyLoweringContext
...
This requires some serious code juggling.
2024-10-30 21:24:19 +02:00
Chayim Refael Friedman
41658de227
Cleanup TypeRef lowering
...
By removing interior mutability from it.
2024-10-28 17:38:37 +02:00
Chayim Refael Friedman
bf7edd3783
Shrink TypeRef
from 16 from 32 bytes
...
Only references and arrays need to be boxed, and they comprise only 9.4% of the types (according to counting on r-a's code).
This saves 17mb.
2024-10-25 06:44:56 +03:00
Chayim Refael Friedman
89c0ffa6b0
Build source map for hir_def::TypeRef
s
...
So that given a `TypeRef` we will be able to trace it back to source code.
This is necessary to be able to provide diagnostics for lowering to chalk tys, since the input to that is `TypeRef`.
This means that `TypeRef`s now have an identity, which means storing them in arena and not interning them, which is an unfortunate (but necessary) loss but also a pretty massive change. Luckily, because of the separation layer we have for IDE and HIR, this change never crosses the IDE boundary.
2024-10-25 06:15:04 +03:00
Lukas Wirth
95298a2e61
fix: Fix incorrect parsing of use bounds
...
Also lower them a bit more
2024-10-22 13:34:26 +02:00
David Barsky
ccee36e8dd
chore: rename salsa to ra_salsa
2024-10-14 10:09:22 -04:00
Lukas Wirth
20f7ab5ab4
fix: Always explicitly set trait ref self types when lowering
2024-09-06 14:06:41 +02:00
Shoyu Vanilla
231083958a
fix: std::error::Error
is object unsafe
2024-08-30 02:00:38 +09:00
Shoyu Vanilla
6520a43ca3
feat: Implement object safety
2024-08-29 22:22:21 +09:00
Shoyu Vanilla
ad05705a4c
fix: Wrong Self: Sized
predicate for trait assoc items
2024-08-24 01:28:48 +09:00
Shoyu Vanilla
71080cfb6b
fix: Wrong Sized
predicate for generic_predicates_for_param
2024-08-22 00:32:44 +09:00
David Richey
e350bc2cf5
Include generics when lowering extern type
2024-08-18 15:12:01 -05:00
Shoyu Vanilla
d7431ecdfa
fix: Wrong BoundVar index when lowering impl trait parameter of parent generics
2024-08-17 22:33:27 +09:00
bors
fc36e0ca16
Auto merge of #17907 - ChayimFriedman2:no-once_cell, r=Veykril
...
internal: 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 07:05:59 +00:00
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
bors
e2fd1db609
Auto merge of #17859 - Veykril:rustc_deprecated_safe_2024, r=Veykril
...
fix: Correctly support `#[rustc_deprecated_safe_2024]`
Fixes https://github.com/rust-lang/rust-analyzer/issues/17852
2024-08-12 08:59:08 +00:00
Lukas Wirth
ded3e21fdd
fix: Correctly support #[rustc_deprecated_safe_2024]
2024-08-12 10:56:59 +02:00
Shoyu Vanilla
c530e21714
feat: Implement TAIT
2024-08-10 15:22:05 +09:00
Lukas Wirth
df5f1777b8
More symbol usage
2024-07-16 12:05:16 +02: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
372e2d22e6
Make GenericParams::type_or_consts private
2024-07-02 13:45:48 +02:00
Lukas Wirth
1a929d6485
Fix lifetime parameters moving paramter defaults
2024-07-02 12:34:32 +02:00
Lukas Wirth
3168ab5b99
Enum variants are not generic def ids
2024-06-24 10:07:31 +02:00
Lukas Wirth
4c62e6b05f
Prevent re-allocation in CallableSig::from_params_and_return
2024-06-21 19:26:08 +02:00
Lukas Wirth
34ba8db3ed
Save allocations for empty generic_defaults query results
2024-06-21 19:21:27 +02:00
Lukas Wirth
2761b1e236
Don't attempt to compute implict sized clauses for empty generics
2024-06-21 19:10:57 +02:00
Lukas Wirth
4d709cc866
Save allocations for empty generic_predicates query results
2024-06-21 19:10:45 +02:00
Lukas Wirth
7a16e06009
Lazy generics
2024-06-21 18:38:37 +02:00
Lukas Wirth
480bfd5a7d
There can only be one self param
2024-06-21 17:55:16 +02:00
Lukas Wirth
cf2b757a1a
Light docs and privacy
2024-06-21 17:54:40 +02:00
Lukas Wirth
585cc9e014
Extract generics module
2024-06-21 10:55:05 +02:00
Wilfred Hughes
3874681cb6
Prefer plain trait definitions over macros for salsa
2024-06-13 17:32:06 -07:00
Lukas Wirth
855282fa53
internal: Don't unnecessarily clone ModPaths in early name res
2024-06-12 11:25:19 +02:00
dfireBird
8cbeb04ba2
fix lifetime bound var index in dyn trait
2024-05-05 23:40:34 +05:30
Lukas Wirth
c97ac34caa
Fix impl trait params not being counted properly
2024-05-02 13:56:10 +02: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
8078c3d9e8
Bump chalk
2024-04-08 11:03:19 +02:00
Lukas Wirth
a82e028e30
Cleanup util::Generics method names
2024-04-06 14:29:40 +02:00
Lukas Wirth
336dee3415
Remove some allocs
2024-04-06 13:40:15 +02:00
Lukas Wirth
13890697eb
Simplify
2024-04-06 13:12:07 +02:00
Lukas Wirth
0927f86247
Replace static_lifetime usages with error_lifetime, lower outlives goals
2024-04-02 14:51:06 +02:00
dfireBird
0e54e2b55a
use references in Generics iter methods
2024-03-26 13:04:54 +05:30
dfireBird
b357bcab2b
modify insert_type_vars
for lifetimes
2024-03-19 10:14:45 +05:30
dfireBird
13301e7a1a
replace static_lifetime with new_lifetime_var where necessary
...
implemented suggested fixes and changes and fix merge conflicts
2024-03-18 17:53:09 +05:30
dfireBird
8d08b337fa
include lifetime in the filter for data layout in analysis-stats
...
clippy fixes
2024-03-18 17:18:08 +05:30
dfireBird
490391f576
fix HirDisplay inserting anonymous lifetimes and update tests
2024-03-18 17:18:08 +05:30
dfireBird
0669ae7faf
handle lifetimes separately in substs function
2024-03-18 17:18:08 +05:30
dfireBird
a6c8cbfd91
update Generics
iter methods to return GenericParamId
2024-03-18 17:18:08 +05:30