about summary refs log tree commit diff
path: root/src/test/rustdoc-ui/intra-doc/macro-rules.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-24/+0
2022-05-01rustdoc: Track `macro_rules` scopes during early doc link resolutionVadim Petrochenkov-0/+15
This way links referring to `macro_rules` items are resolved correctly
2022-02-06rustdoc: Special-case macro lookups lessJoshua Nelson-0/+9
Previously, rustdoc had 3 fallbacks it used: 1. `resolve_macro_path` 2. `all_macros` 3. `resolve_str_path_error` Ideally, it would only use `resolve_str_path_error`, to be consistent with other namespaces. Unfortunately, that doesn't consider macros that aren't defined at module scope; consider for instance ```rust { struct S; macro_rules! mac { () => {} } // `mac`'s scope starts here /// `mac` <- `resolve_str_path_error` won't see this struct Z; //`mac`'s scope ends here } ``` This changes it to only use `all_macros` and `resolve_str_path_error`, and gives `resolve_str_path_error` precedence over `all_macros` in case there are two macros with the same name in the same module. This also adds a failing test case which will catch trying to remove `all_macros`.