Commit graph

1387 commits

Author SHA1 Message Date
Lukas Wirth
6b2e677795 fix: Only compute unstable paths on nightly toolchains for IDE features
Some checks failed
release / dist (aarch64-apple-darwin) (push) Has been cancelled
release / dist (x86_64-apple-darwin) (push) Has been cancelled
release / dist (aarch64-unknown-linux-gnu) (push) Has been cancelled
release / dist (arm-unknown-linux-gnueabihf) (push) Has been cancelled
release / dist (x86_64-unknown-linux-gnu) (push) Has been cancelled
release / dist (aarch64-pc-windows-msvc) (push) Has been cancelled
release / dist (x86_64-pc-windows-msvc) (push) Has been cancelled
release / dist (i686-pc-windows-msvc) (push) Has been cancelled
release / dist (x86_64-unknown-linux-musl) (push) Has been cancelled
autopublish / publish (push) Has been cancelled
release / publish (push) Has been cancelled
2025-08-25 08:46:02 +02:00
Lukas Wirth
8ce30264c8 cargo clippy --fix 2025-07-31 10:55:10 +02:00
Lukas Wirth
97593ea9c6
Merge pull request #20289 from ChayimFriedman2/expr-store-diags-macros
internal: Remove `ExpressionStoreDiagnostics::MacroError`, instead recreate it from the `MacroCallId`
2025-07-23 13:58:10 +00:00
Chayim Refael Friedman
963a1317e7 Remove ExpressionStoreDiagnostics::MacroError, instead recreate it from the MacroCallId
This simplifies the code and also makes us report parse error in macros too.
2025-07-23 16:27:07 +03:00
Chayim Refael Friedman
c7ceb39f67 Parse for<'a> [const]
And also refactor parsing of HRTB.
2025-07-22 16:24:42 +03:00
John Paul Adrian Glaubitz
25122d9289 hir-def: Don't apply x86_64-specific asserts on x32
This fixes the rustc build on x32 for which struct sizes differ.
2025-07-21 17:03:07 +02:00
Chayim Refael Friedman
b1914e420f Support cfg_select! 2025-07-20 11:56:45 +03:00
Andrey Nikolaev
2b861a7410
remove now useless [allow(unused_lifetimes)] 2025-07-13 05:43:05 -04:00
Chayim Refael Friedman
4b29a9d6ea
Merge pull request #20219 from ChayimFriedman2/expr-store-mem
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / generate_final_metrics (push) Blocked by required conditions
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
perf: Put the expression stuff in the expression store behind an `Option<Box>`
2025-07-11 14:25:39 +00:00
Shoyu Vanilla (Flint)
e9968fc555
Merge pull request #20210 from ChayimFriedman2/naked-asm-safe
fix: Inline asm fixes
2025-07-10 06:28:49 +00:00
Chayim Refael Friedman
ad708fdbd1 Put the expression stuff in the expression store behind an Option<Box>
And leave only the type stuff without it.

This is because most expression stores don't have anything but types (e.g. generics, fields, signatures) so this saves a lot of memory.

This saves 58mb on `analysis-stats .`.
2025-07-10 05:18:43 +03:00
Chayim Refael Friedman
95c04c4503 Make global_asm!() work
Because apparently, we were not accepting inline asm in item position, completely breaking it.
2025-07-09 18:55:27 +03:00
Chayim Refael Friedman
bd8087e86e Differentiate between asm!(), global_asm!() and naked_asm!(), and make only asm!() unsafe 2025-07-09 17:37:27 +03:00
Chayim Refael Friedman
edb804a100 Don't hash the SyntaxKind in the ast id
There is no need to, it's already stored in the `kind`.
2025-07-09 17:21:45 +03:00
Chayim Refael Friedman
87cddda2d8 Always bump in the parser in err_and_bump()
Even when at curly braces, otherwise the parser can get stuck.

This has happened in the past in #18625, but it was just worked around instead of handling the root of the problem. Now this happened again in #20171. IMO we can't let `err_and_bump()` not bump, that's too confusing and invites errors. We can (as I did) workaround the worse recovery instead.
2025-07-06 03:21:43 +03:00
Lukas Wirth
638e49b0fc Skip unnecessary eq work in BodySourceMap 2025-07-04 11:36:06 +02:00
Chayim Refael Friedman
9c4a7705b1 Fix some things with builtin derives
1. Err on unions on derive where it's required.
 2. Err on `#[derive(Default)]` on enums without `#[default]` variant.
 3. Don't add where bounds `T: Default` when expanding `Default` on enums (structs need that, enums not).

Also, because I was annoyed by that, in minicore, add a way to filter on multiple flags in the line-filter (`// :`). This is required for the `Debug` and `Hash` derives, because the derive should be in the prelude but the trait not.
2025-07-03 23:05:56 +03:00
Lukas Wirth
8029c731ed Bump salsa 2025-07-03 10:05:16 +02:00
Chayim Refael Friedman
a6c1fa01d9
Merge pull request #20100 from ShoyuVanilla/ignore-sized-hierarchy
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
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 8643a858db.
2025-06-19 07:40:01 +02:00
Chayim Refael Friedman
a207299344
Merge pull request #20000 from tadeokondrak/lifetime-repeat-macro
Some checks failed
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
autopublish / publish (push) Has been cancelled
release / dist (aarch64-apple-darwin) (push) Has been cancelled
release / dist (x86_64-apple-darwin) (push) Has been cancelled
release / dist (aarch64-unknown-linux-gnu) (push) Has been cancelled
release / dist (arm-unknown-linux-gnueabihf) (push) Has been cancelled
release / dist (x86_64-unknown-linux-gnu) (push) Has been cancelled
release / dist (aarch64-pc-windows-msvc) (push) Has been cancelled
release / dist (x86_64-pc-windows-msvc) (push) Has been cancelled
release / dist (i686-pc-windows-msvc) (push) Has been cancelled
release / dist (x86_64-unknown-linux-musl) (push) Has been cancelled
release / publish (push) Has been cancelled
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