rust-analyzer/crates
Chayim Refael Friedman 4eb19df5e9 Use more correct handling of lint attributes
The previous analysis was top-down, and worked on a single file (expanding macros). The new analysis is bottom-up, starting from the diagnostics and climbing up the syntax and module tree.

While this is more efficient (and in fact, efficiency was the motivating reason to work on this), unfortunately the code was already fast enough. But luckily, it also fixes a correctness problem: outline parent modules' attributes were not respected for the previous analysis. Case lints specifically did their own analysis to accommodate that, but it was limited to only them. The new analysis works on all kinds of lints, present and future.

It was basically impossible to fix the old analysis without rewriting it because navigating the module hierarchy must come bottom-up, and if we already have a bottom-up analysis (including syntax analysis because modules can be nested in other syntax elements, including macros), it makes sense to use only this kind of analysis.

Few other bugs (not fundamental ti the previous analysis) are also fixed, e.g. overwriting of lint levels (i.e. `#[allow(lint)] mod foo { #[warn(lint)] mod bar; }`.
2024-09-12 15:24:38 +03:00
..
base-db Lift out workspace related data into a separate query to preserve crategraph deduplication 2024-09-11 12:16:41 +02:00
cfg Remove unnecessary CfgFlag definition in project-model 2024-08-07 14:27:59 +02:00
hir Use more correct handling of lint attributes 2024-09-12 15:24:38 +03:00
hir-def Use more correct handling of lint attributes 2024-09-12 15:24:38 +03:00
hir-expand Auto merge of #18080 - Veykril:dedup, r=Veykril 2024-09-11 11:47:17 +00:00
hir-ty Use more correct handling of lint attributes 2024-09-12 15:24:38 +03:00
ide Auto merge of #18075 - roife:fix-issue-17858, r=Veykril 2024-09-11 12:05:57 +00:00
ide-assists Auto merge of #18078 - cuishuang:master, r=Veykril 2024-09-11 11:32:46 +00:00
ide-completion Automatically add semicolon when completing unit-returning functions 2024-09-08 23:41:16 +03:00
ide-db Auto merge of #18041 - roife:fix-issue-17631, r=Veykril 2024-09-09 13:55:20 +00:00
ide-diagnostics Use more correct handling of lint attributes 2024-09-12 15:24:38 +03:00
ide-ssr Properly account for editions in names 2024-08-16 16:46:24 +03:00
intern chore: fix some comments 2024-09-02 18:33:23 +08:00
limit Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
load-cargo Properly set the working directory for proc-macro execution 2024-09-11 12:23:12 +02:00
mbe internal: Lay basic ground work for standalone mbe tests 2024-09-01 12:42:44 +02:00
parser fix: Fix parser panicking on invalid asm options 2024-09-05 17:07:10 +02:00
paths Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
proc-macro-api Properly set the working directory for proc-macro execution 2024-09-11 12:23:12 +02:00
proc-macro-srv fix: Fix TokenStream::to_string implementation dropping quotation marks 2024-08-29 08:45:35 +02:00
proc-macro-srv-cli Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
profile Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
project-model Remove crate graph deduplication logic 2024-09-11 11:38:42 +02:00
rust-analyzer Auto merge of #18080 - Veykril:dedup, r=Veykril 2024-09-11 11:47:17 +00:00
salsa Drop Apache license appendices 2024-08-27 14:52:34 +03:00
span chore: fix some comments 2024-09-02 18:33:23 +08:00
stdx Use crossbeam-channel from the workspace 2024-08-09 23:48:03 +02:00
syntax Use more correct handling of lint attributes 2024-09-12 15:24:38 +03:00
syntax-bridge internal: Lay basic ground work for standalone mbe tests 2024-09-01 12:42:44 +02:00
test-fixture Properly set the working directory for proc-macro execution 2024-09-11 12:23:12 +02:00
test-utils fix: Always explicitly set trait ref self types when lowering 2024-09-06 14:06:41 +02:00
text-edit Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
toolchain Replace [package.repository] = "…" of published crates with [package.repository.workspace] = true 2024-08-06 00:26:42 +02:00
tt fix: Fix TokenStream::to_string implementation dropping quotation marks 2024-08-29 08:45:35 +02:00
vfs internal: Lay basic ground work for standalone mbe tests 2024-09-01 12:42:44 +02:00
vfs-notify Auto merge of #17843 - mo8it:flycheck, r=Veykril 2024-08-12 09:27:47 +00:00