rust-analyzer/crates/hir-expand/src
Chayim Refael Friedman 8adcbdcc49 Implement semitransparent hygiene
Or macro_rules hygiene, or mixed site hygiene. In other words, hygiene for variables and labels but not items.

The realization that made me implement this was that while "full" hygiene (aka. def site hygiene) is really hard for us to implement, and will likely involve intrusive changes and performance losses, since every `Name` will have to carry hygiene, mixed site hygiene is very local: it applies only to bodies, and we very well can save it in a side map with minor losses.

This fixes one diagnostic in r-a that was about `izip!()` using hygiene (yay!) but it introduces a huge number of others, because of #18262. Up until now this issue wasn't a major problem because it only affected few cases, but with hygiene identifiers referred by macros like that are not resolved at all. The next commit will fix that.
2024-10-22 21:26:56 +03:00
..
builtin fix: Fix token downmapping failing for include! inputs 2024-10-21 17:22:18 +02:00
attrs.rs Split out syntax-bridge into a separate crate 2024-08-05 13:45:00 +02:00
builtin.rs Always cache macro expansions' root node in Semantics 2024-09-17 00:19:39 +03:00
cfg_process.rs Handle lint attributes that are under #[cfg_attr] 2024-09-19 22:21:48 +03:00
change.rs chore: rename salsa to ra_salsa 2024-10-14 10:09:22 -04:00
db.rs Increase TOKEN_LIMIT for hir-expand 2024-10-18 17:36:24 -07:00
declarative.rs Remove unnecessary symbols and add missing symbols 2024-09-09 16:36:37 +08:00
eager.rs Revert "feat: Implement module_path macro" 2024-08-27 08:19:09 +02:00
files.rs Thread file id through descension API for semantic highlighting 2024-08-22 16:45:37 +02:00
fixup.rs Split out syntax-bridge into a separate crate 2024-08-05 13:45:00 +02:00
hygiene.rs Fix new nightly lints 2024-10-22 11:48:41 +02:00
inert_attr_macro.rs Add an internal lint that warns when accessing untracked data 2024-09-03 19:14:19 +02:00
lib.rs chore: rename salsa to ra_salsa 2024-10-14 10:09:22 -04:00
mod_path.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00
name.rs Implement semitransparent hygiene 2024-10-22 21:26:56 +03:00
prettify_macro_expansion_.rs Fix prettify_macro_expansion() when the node isn't the whole file 2024-10-05 22:39:33 +03:00
proc_macro.rs Properly set the working directory for proc-macro execution 2024-09-11 12:23:12 +02:00
span_map.rs Split out syntax-bridge into a separate crate 2024-08-05 13:45:00 +02:00