Commit graph

78 commits

Author SHA1 Message Date
Chayim Refael Friedman
c58ddafe90 Make HirFileId, EditionedFileId and macro files Salsa struct
And make more queries non-interned.

Also flip the default for queries, now the default is to not intern and to intern a query you need to say `invoke_interned`.
2025-04-19 22:10:52 +03:00
Lukas Wirth
1fd9520c92 refactor: Lower type-refs before type inference
This refactors how we deal with items in hir-def lowering.

- It now lowers all of them through an "ExpressionStore" (kind of a misnomer as this point) as their so called *Signatures.
- We now uniformly lower type AST into TypeRefs before type inference.
- Likewise, this moves macro expansion out of type inference, resulting in a single place where we do non-defmap macro expansion.
- Finally, this PR removes a lot of information from ItemTree, making the DefMap a lot less likely to be recomputed and have it only depend on actual early name resolution related information (not 100% true, we still have ADT fields in there but thats a follow up removal).
2025-04-09 10:43:23 +02:00
Shoyu Vanilla
b07a76d6af fix: Properly calculate the layouts of tuple ptrs whose last fields are DST 2025-03-22 12:57:28 +09:00
BenjaminBrienen
7535bb4661 cargo fmt 2025-03-15 21:32:01 +01:00
Lukas Wirth
2ea09b2e47 Split variant_data into its own query 2025-03-14 14:16:33 +01:00
David Barsky
74620e64ec internal: port rust-analyzer to new Salsa 2025-03-10 13:30:51 -04:00
Laurențiu Nicola
be48993351
Merge pull request #19331 from lnicola/sync-from-rust
minor: Sync from downstream
2025-03-10 09:52:17 +00:00
Laurențiu Nicola
25e4bd1f90 Format code 2025-03-10 11:37:21 +02:00
Moulins
18772836d4 Use rustc_abi code for SIMD layout in rust-analyzer 2025-03-08 12:36:42 +01:00
Moulins
4929f38544 Remove most manual LayoutData creations and move them to rustc_abi
...either as:
- methods on LayoutCalculator, for faillible operations;
- constructors on LayoutData, for infaillible ones.
2025-03-08 12:27:19 +01:00
Chayim Refael Friedman
1cd9e683e8 Normalize projections in evaluated const display and layout calculation 2025-03-06 20:55:50 +02:00
Moulins
c64ed1e187 Remove layouting dead code for non-array SIMD types.
These aren't supported anymore, and are already rejected in type checking.
2025-03-02 12:50:14 +01:00
Ralf Jung
5377cfb472 rename BackendRepr::Vector → SimdVector 2025-02-28 17:17:45 +01:00
Laurențiu Nicola
f641813e07 Format code 2025-02-24 10:28:46 +02:00
Jubilee Young
eb4c00e9c7 rust-analyzer: use new function in (incorrect) layout computation
This is only to fix the build.
2025-02-20 19:55:29 -08:00
Zachary S
8aba4e6dcb Remove BackendRepr::Uninhabited, replaced with an uninhabited: bool field in LayoutData.
Also update comments that refered to BackendRepr::Uninhabited.
2025-02-20 13:27:32 -06:00
Ben Kimock
b4b1e778c9 Move hashes from rustc_data_structure to rustc_hashes so they can be shared with rust-analyzer 2025-02-16 16:18:30 -05:00
The 8472
7b368b97ba also initialize Layout field in rust-analyzer 2025-01-10 02:22:57 +01:00
Laurențiu Nicola
b385bf2e53 Format code 2024-11-01 14:12:18 +02:00
Jubilee Young
92faf55954 rust-analyzer: rustc_abi::Abi => BackendRepr 2024-10-29 15:01:01 -07:00
Jubilee Young
f806406728 rust-analyzer: Rename LayoutS to LayoutData 2024-10-27 22:32:58 -07:00
Laurențiu Nicola
a32039278f Replace some LayoutError variants with the rustc_abi errors 2024-10-22 10:19:25 +03:00
Stuart Cook
d6350f60f7
Rollup merge of #131942 - workingjubilee:reduce-haruspicy, r=lukas-code,lnicola
compiler: Adopt rust-analyzer impls for `LayoutCalculatorError`

We're about to massively churn the internals of `rustc_abi`. To minimize the immediate and future impact on rust-analyzer, as a subtree that depends on this crate, grow some API on `LayoutCalculatorError` that reflects their uses of it. This way we can nest the type in theirs, and they can just call functions on it without having to inspect and flatten-out its innards.
2024-10-20 14:06:04 +11:00
Jubilee Young
90ec8053c2 rust-analyzer: Nest LayoutCalculatorError in hir_ty::LayoutError 2024-10-19 11:09:24 -07:00
David Barsky
ccee36e8dd chore: rename salsa to ra_salsa 2024-10-14 10:09:22 -04:00
Laurențiu Nicola
6c24765cd4 Add more LayoutError variants 2024-09-25 09:15:11 +03:00
Lukas Markeffsky
cd442a0577 assert that unexpectedly unsized fields are sized in the param env 2024-09-17 00:06:56 +02:00
Lukas Markeffsky
08344c2ae8 layout computation: eagerly error for unexpected unsized fields 2024-09-16 15:53:21 +02:00
Shoyu Vanilla
c530e21714 feat: Implement TAIT 2024-08-10 15:22:05 +09:00
beetrees
d5db933f9d
Add f16 and f128 support 2024-07-10 10:43:14 +01:00
beetrees
861cca5249
Refactor float Primitives to a separate Float type 2024-05-06 14:56:10 +01:00
Shoyu Vanilla
d2aba91a0c feat: Implement ATPIT 2024-03-16 03:31:12 +09:00
Lukas Wirth
458f4a2960 internal: Treat the self param as different from patterns when lowering 2024-03-11 09:46:28 +01:00
Nadrieril
e31484c108 Update the other crates too 2024-03-07 16:44:46 +01:00
Lukas Wirth
5136705fad internal: Remove SELF_REF hack for self referential SyntaxContexts 2024-02-10 16:20:02 +01:00
Lukas Wirth
5860763f18 Cleanup error variants in MIR code slightly 2024-01-30 09:53:39 +01:00
Johann Hemmann
fad4fa163c cargo clippy --fix 2024-01-18 13:59:49 +01:00
bors
5df53c9612 Auto merge of #16351 - Veykril:eager-enum-variant, r=Veykril
internal: Eagerly lower enum variants in CrateDefMap construction
2024-01-16 08:39:13 +00:00
Moritz Hedtke
fe35447617 fix: rename generator to coroutine also in dependencies
Follow the rename in nightly (see https://blog.rust-lang.org/inside-rust/2023/10/23/coroutines.html)
2024-01-15 12:24:48 +01:00
Lukas Wirth
d80d2fcae0 Eagerly lower enum variants in CrateDefMap construction 2024-01-15 10:24:14 +01:00
Lukas Wirth
f972da70d4 Remove rustc_dependencies crate 2024-01-08 15:39:35 +01:00
Matthias Krüger
476e10e961 remove redundant clones 2024-01-07 00:17:48 +01:00
Lukas Wirth
45d81048c9 internal: Bump salsa 2023-12-07 10:57:51 +01:00
Laurențiu Nicola
22676ce946 Revert "Temporarily revert delay_bug to delayed_bug change"
This reverts commit 6d2543b622.
2023-12-05 13:39:45 +02:00
Lukas Wirth
b74015512d Remove UserError from LayoutError 2023-11-14 13:32:04 +01:00
Lukas Wirth
40acc5250f Update rustc_abi dependency 2023-10-15 18:57:40 +02:00
hkalbasi
f4704bc8ae Switch to in-tree rustc dependencies with a cfg flag 2023-09-15 18:10:11 +03:30
Lukas Wirth
ccff704c25 Shrink some stuff 2023-09-10 08:24:26 +02:00
hkalbasi
fa76f60cc1 Run cargo fmt on 1.72 2023-08-25 22:24:41 +03:30
hkalbasi
bd2a8ca507 Add manual implementation of clone for tuples in mir interpreter 2023-07-28 18:52:01 +03:30