David Barsky
52ee4ee1df
Back out "Add a test for field default value body as defining usage of TAIT"
...
This backs out commit 4fe18a6fb5a1181a04c47391f558ebab5b8b0f39.
2025-01-27 17:30:34 -05:00
David Barsky
55d3851820
Back out "Remove has_default
from FieldId
"
...
This backs out commit 8aa6c09fcee6270c787a6f00615d76343fbe5c07.
2025-01-27 17:30:34 -05:00
Chayim Refael Friedman
55c63abc59
Fix #[rustc_deprecated_safe_2024]
...
It should be considered by the edition of the caller, not the callee.
Technically we still don't do it correctly - we need the span of the method name (if it comes from a macro), but we don't keep it and this is good enough for now.
2025-01-27 14:35:20 +02:00
Shoyu Vanilla
8aa6c09fce
Remove has_default
from FieldId
2025-01-27 19:41:58 +09:00
Shoyu Vanilla
4fe18a6fb5
Add a test for field default value body as defining usage of TAIT
2025-01-27 19:41:58 +09:00
Shoyu Vanilla
ce9da90630
Implement HasResolver
and HasModule
for FieldId
2025-01-27 19:41:58 +09:00
Shoyu Vanilla
b4d4d02db8
Compute diagnostics of a field body iff it has one
2025-01-27 19:41:57 +09:00
Shoyu Vanilla
c134b20c9c
Merge record lit's ellipsis into pre-existing spread's variant
2025-01-27 19:41:54 +09:00
Shoyu Vanilla
e6a103ae50
Handle missing fields diagnostics
2025-01-27 19:38:39 +09:00
Shoyu Vanilla
7de0b2e75a
feat: Implement default-field-values
2025-01-27 19:38:35 +09:00
Lukas Wirth
35b55fd67f
Merge pull request #19036 from Veykril/push-nprltlwvryxw
...
Split out `ExpressionStore` from `Body`
2025-01-27 07:54:44 +00:00
Chayim Refael Friedman
791b1ebfd4
Support RFC 2396
...
AKA. target_feature 1.1, or non unsafe target_feature.
2025-01-26 23:31:58 +02:00
Lukas Wirth
3bb0ff3480
Add GenericDefId::StaticId
2025-01-26 11:07:54 +01:00
Lukas Wirth
55d1d5dd8b
Split out ExpressionStore
from Body
2025-01-26 11:02:00 +01:00
Lukas Wirth
db6d23c0e5
Cleanup body ast ptr defs
2025-01-25 14:47:16 +01:00
Lukas Wirth
724455bf5a
BodyCollector
2025-01-25 14:43:22 +01:00
Lukas Wirth
6012e961a7
Combine pat_hyigene
and expr_hygiene
2025-01-25 14:28:43 +01:00
Lukas Wirth
b31f53e0d6
Fix flyimport not filtering via stability of import path
2025-01-25 12:18:54 +01:00
Lukas Wirth
6e4c29f7ce
Merge pull request #19018 from Veykril/push-wxqqunxwrply
...
internal: Record the use tree index in glob imports
2025-01-24 14:27:49 +00:00
Lukas Wirth
433888c4b2
Record the use tree index in glob imports
2025-01-24 15:12:48 +01:00
Lukas Wirth
3a163faba1
Merge pull request #19012 from ShoyuVanilla/arbitrary-self
...
feat: Implement `arbitrary-self-types`
2025-01-24 14:04:34 +00:00
Shoyu Vanilla
f4dfbc38c8
feat: Implement arbitrary-self-types
2025-01-24 22:50:59 +09:00
Lukas Wirth
93de80d833
Merge pull request #19016 from Veykril/push-moqnsytyrupu
...
fix: Fix `ItemScope` not recording glob imports
2025-01-24 13:25:39 +00:00
Lukas Wirth
3b88a2f134
Fix ItemScope
not recording glob imports
...
This caused us other code to incorrectly assume in dealing with a declaration when in fact it was dealing with a glob imported definition
2025-01-24 14:11:45 +01:00
David Richey
1b6f95e885
Check cfg when collecting macro defs
2025-01-23 17:36:45 -06:00
Lukas Wirth
76585539f5
Cleanup Name
string rendering
2025-01-21 10:05:32 +01:00
Lukas Wirth
03ea40369f
Move dual blanket impl logic from source analyzer to goto_def
2025-01-20 16:24:42 +01:00
Lukas Wirth
93a5846784
Merge pull request #18967 from Veykril/push-pwonkmwqmmol
...
Properly record meaningful imports as re-exports in symbol index
2025-01-20 13:46:52 +00:00
Lukas Wirth
0480ebef75
Preserve impl assoc names in ImplData
2025-01-20 14:29:11 +01:00
Lukas Wirth
51cc1a4614
Properly record meaningful imports as re-exports in symbol index
2025-01-20 14:29:11 +01:00
Chayim Refael Friedman
044c831f7f
Fix a bug where enum variants were not considered properly in type ns resolution
...
They should be considered just as well as in value ns, for example for struct literals.
2025-01-19 06:31:23 +02:00
lh123
9809143562
feat: complete raw, const keyword
2025-01-16 18:27:59 +08:00
Lukas Wirth
4f35021ca9
Merge pull request #18907 from Veykril/push-uqlzpttmvurv
...
Implement `#[rust_analyzer::skip]` for bodies
2025-01-10 13:59:23 +00:00
Lukas Wirth
f209d50dcf
Implement #[rust_analyzer::skip]
for bodies
2025-01-10 14:41:27 +01:00
Lukas Wirth
bf669dab84
Re-implement rust string highlighting via tool attribute
2025-01-10 13:49:35 +01:00
Lukas Wirth
3fe50ef83c
Merge pull request #18861 from ChayimFriedman2/await-edition
...
fix: Make edition per-token, not per-file
2025-01-09 10:20:11 +00:00
Chayim Refael Friedman
97afb7bfba
Make edition per-token, not per-file
...
More correctly, *also* per-token. Because as it turns out, while the top-level edition affects parsing (I think), the per-token edition affects escaping of identifiers/keywords.
2025-01-09 05:43:08 +02:00
Laurențiu Nicola
cd12ef8547
Merge pull request #18853 from ChayimFriedman2/no-completion
...
Fix case where completion inside macro that expands to `#[test]` was unavailable
2025-01-07 06:44:50 +00:00
Chayim Refael Friedman
b24142b50b
Fix case where completion inside macro that expands to #[test]
was unavailable
...
We ignore `#[test]` in the def map, so that's why it failed.
2025-01-06 22:02:24 +02:00
Lukas Wirth
4b6007115a
minor: New clippy lints
2025-01-06 17:57:17 +01:00
Chayim Refael Friedman
ce323627c5
Support the new CoercePointee
derive
2025-01-04 18:35:53 +02:00
Lukas Wirth
b67de74de9
Merge pull request #18825 from Veykril/push-sllokkprznkq
...
minor: Encode TraitData bools as bitflags
2025-01-03 12:01:08 +00:00
Lukas Wirth
4d66fa797f
minor: Encode TraitData bools as bitflags
2025-01-03 12:46:07 +01:00
Lukas Wirth
b6910ed1b2
Merge pull request #18327 from ChayimFriedman2/flat-tt
...
Store token trees in contiguous `Vec` instead of as a tree
2025-01-03 11:31:58 +00:00
Chayim Refael Friedman
ceba289f80
Store token trees in contiguous Vec
instead of as a tree
...
I expected this to be faster (due to less allocations and better cache locality), but benchmarked it is not (neither it is slower). Memory usage, however, drops by ~50mb (of `analysis-stats .`). I guess tt construction is just not hot.
This also simplifies using even less memory for token trees by compressing equal span, which I plan to do right after.
Some workflows are more easily expressed with a flat tt, while some are better expressed with a tree. With the right helpers, though (which was mostly a matter of trial and error), even the worst workflows become very easy indeed.
2025-01-02 19:21:46 +02:00
Lukas Wirth
d30bd5fbb5
Remove recursion_limit special casing in tests
2024-12-31 13:00:23 +01:00
Chayim Refael Friedman
664e1a18c9
Consider Enum::Variant
even when it comes from a different crate
2024-12-28 22:43:51 +02:00
Chayim Refael Friedman
cc11e1a796
Unify handling of path diagnostics in hir-ty
...
Because it was a mess.
Previously, pretty much you had to handle all path diagnostics manually: remember to check for them and handle them. Now, we wrap the resolver in `TyLoweringContext` and ensure proper error reporting.
This means that you don't have to worry about them: most of the things are handled automatically, and things that cannot will create a compile-time error (forcing you top `drop(ty_lowering_context);`) if forgotten, instead of silently dropping the diagnostics.
The real place for error reporting is in the hir-def resolver, because there are other things resolving, both in hir-ty and in hir-def, and they all need to ensure proper diagnostics. But this is a good start, and future compatible.
This commit also ensures proper path diagnostics for value/pattern paths, which is why it's marked "feat".
2024-12-24 18:58:52 +02:00
Lukas Wirth
027daf1686
Merge pull request #18702 from ChayimFriedman2/prep
...
minor: Use a record struct instead of a tuple for each namespace in `PerNs`
2024-12-20 11:05:49 +00:00
Lukas Wirth
2780dfd80c
Merge pull request #18708 from ChayimFriedman2/fix-tiny
...
fix: Fix pretty-printing of `@` patterns
2024-12-18 07:41:09 +00:00