1369 Commits

Author SHA1 Message Date
Chayim Refael Friedman
a6c1fa01d9
Merge pull request #20100 from ShoyuVanilla/ignore-sized-hierarchy
Backport new sized-hierarchy trait bounds in old ways
2025-06-26 20:37:18 +00:00
Shoyu Vanilla
953e9d1c36 Backport new sized-hierarchy trait bounds in old ways 2025-06-26 23:22:26 +09:00
Lukas Wirth
468726178f Bring back the firewall query 2025-06-26 14:12:57 +02:00
Lukas Wirth
889d84a1be Salsa idiomize VariantFields query 2025-06-26 12:55:55 +02:00
Lukas Wirth
ad3a2d7280
Merge pull request #20088 from Veykril/push-qrslvzzlqqoz
De-arc trait items query
2025-06-25 08:19:32 +00:00
Lukas Wirth
f25912c6f9 De-arc trait items query 2025-06-25 10:09:21 +02:00
Lukas Wirth
c43e7c71de Short circuit a couple hir-ty/lower queries 2025-06-24 20:04:43 +02:00
Lukas Wirth
95dce2be51
Merge pull request #20062 from ChayimFriedman2/doctests
minor: Don't run doctests
2025-06-24 06:47:24 +00:00
Shoyu Vanilla
254c6ec8e1 fix: Use ROOT hygiene for args inside new format_args! expansion 2025-06-24 01:10:32 +09:00
Chayim Refael Friedman
de312d0c71 Don't run doctests 2025-06-23 00:50:22 +03:00
Shoyu Vanilla
4f8767d790 Minic rustc's new format_args! expansion 2025-06-22 13:22:28 +09:00
Lukas Wirth
6301c35cf3 Revert "Turn BlockId into a #[salsa::tracked]"
This reverts commit 8643a858dbaf12b37e90b603cdee64434576c229.
2025-06-19 07:40:01 +02:00
Chayim Refael Friedman
a207299344
Merge pull request #20000 from tadeokondrak/lifetime-repeat-macro
Allow lifetime repeats in macros: $($x)'a*
2025-06-15 16:34:42 +00:00
Tadeo Kondrak
2070e9a8f3 Use is_any_identifier in pretty_print_macro_expansion 2025-06-15 18:23:18 +02:00
Tadeo Kondrak
12226b704a Fix spacing for LIFETIME_IDENT near keywords and literals in test output 2025-06-15 17:43:45 +02:00
Lukas Wirth
b3768cdc0e Optimize private visibility resolution 2025-06-15 10:25:45 +02:00
Lukas Wirth
e129cdc202 Optimize pub(crate) visibility resolution 2025-06-15 10:25:45 +02:00
Lukas Wirth
4b38ea5abd Unify assoc item visibility queries 2025-06-15 10:01:34 +02:00
Lukas Wirth
bceeb6a3c7 Idiomatic salsa use for extern block abi query 2025-06-15 10:01:04 +02:00
Lukas Wirth
4e392f82cb Idiomatic salsa use for impl items query 2025-06-15 09:40:02 +02:00
Lukas Wirth
155ef3de60 Replace unnecessary use of MacroDefId with MacroId 2025-06-15 09:16:45 +02:00
Lukas Wirth
aa2d234426 Idiomatic salsa use for enum variants query 2025-06-15 09:03:44 +02:00
Lukas Wirth
f68512af65 Cleanup incremental tests 2025-06-15 08:07:49 +02:00
Tadeo Kondrak
a7c09532a0 Allow lifetime repeats in macros: $($x)'a*
This works in rustc. This change isn't motivated by any real code.
I just learned about it and decided to see why it doesn't work with
rust-analyzer.
2025-06-13 18:13:01 -06:00
Lukas Wirth
8643a858db Turn BlockId into a #[salsa::tracked] 2025-06-13 17:30:04 +02:00
Lukas Wirth
9f051ee104 Use ThinVec in ItemScope in a couple places 2025-06-13 15:34:03 +02:00
Lukas Wirth
b9ce647cf1 Bring back EMPTY item tree deduplication 2025-06-13 14:51:23 +02:00
Lukas Wirth
bd002fe65c
Merge pull request #19982 from Veykril/push-uptnmqtlylsx
Simplify and optimize `ItemTree`
2025-06-13 11:16:24 +00:00
Lukas Wirth
16ebd2990f Remove unnecessary item tree query calls 2025-06-13 13:05:52 +02:00
Lukas Wirth
23712aea06 cargo upgrade 2025-06-13 10:08:20 +02:00
Lukas Wirth
048a01a05d Remove ast ids from item tree mod items 2025-06-13 08:47:25 +02:00
Lukas Wirth
65e2e2c083 Split mod items into small and big variants 2025-06-13 08:24:50 +02:00
Lukas Wirth
ace69d93e0 Store item tree visibilities in a thin vec 2025-06-13 08:09:57 +02:00
Lukas Wirth
17d848a1bb Fix tests 2025-06-12 14:01:46 +02:00
Lukas Wirth
d8a6aaef96 Return item tree query results by ref 2025-06-12 13:35:43 +02:00
Lukas Wirth
2448abdb55 Remove dead code 2025-06-12 13:35:43 +02:00
Lukas Wirth
23eef0c4ea Shrink ModItem by usize 2025-06-12 13:35:43 +02:00
Chayim Refael Friedman
8715e6f8ac
Merge pull request #19983 from ChayimFriedman2/proc-macro-eq
fix: Fix comparison of proc macros
2025-06-12 10:42:21 +00:00
Chayim Refael Friedman
4f54885901 Fix comparison of proc macros
Comparing the TypeId is not enough, they also contain data.
2025-06-12 13:31:55 +03:00
Lukas Wirth
83a7ecdead Remove AttrOwner 2025-06-12 12:09:41 +02:00
Lukas Wirth
f27268f319 Ditch the unnecessary smallvec 2025-06-12 11:27:55 +02:00
Lukas Wirth
8930c58d30 Coalesce item tree data maps 2025-06-12 11:21:26 +02:00
Lukas Wirth
80996dca35 AttrOwner needs no ModItem 2025-06-12 11:05:18 +02:00
Lukas Wirth
f3434f537f Remove FileItemTreeId 2025-06-12 10:25:06 +02:00
Lukas Wirth
e9f8ecab45 Remove ItemTreeId 2025-06-12 10:25:06 +02:00
Lukas Wirth
13494f4cac ItemTree's ItemVisibilities has no identity, so deduplicate 2025-06-12 09:14:43 +02:00
Chayim Refael Friedman
0a1a78cb87 Remove most of the item tree
I'm joking, but now that the def map is the only thing that uses the item tree, we can remove a lot of things from it that aren't needed for the def map.
2025-06-12 08:50:43 +03:00
Chayim Refael Friedman
ed0b4506dd Avoid referring to the item tree except in the def map
Item tree IDs are very unstable (adding an item of a kind invalidates all following items of the same kind). Instead use ast ids, which, since the previous commit, are pretty stable.
2025-06-12 08:50:40 +03:00
Chayim Refael Friedman
4bcf03e28b Use stable AST IDs
Instead of simple numbering, we hash important bits, like the name of the item.

This will allow for much better incrementality, e.g. when you add an item. Currently, this invalidates the IDs of all following items, which invalidates pretty much everything.
2025-06-12 08:47:22 +03:00
Wilfred Hughes
e7ae13368b [minor] Fix typos 2025-06-10 13:22:03 +01:00