about summary refs log tree commit diff
path: root/compiler/rustc_expand/src/mut_visit/tests.rs
AgeCommit message (Collapse)AuthorLines
2024-05-06Move some tests from `rustc_expand` to `rustc_parse`.Nicholas Nethercote-72/+0
There are some test cases involving `parse` and `tokenstream` and `mut_visit` that are located in `rustc_expand`. Because it used to be the case that constructing a `ParseSess` required the involvement of `rustc_expand`. However, since #64197 merged (a long time ago) `rust_expand` no longer needs to be involved. This commit moves the tests into `rustc_parse`. This is the optimal place for the `parse` tests. It's not ideal for the `tokenstream` and `mut_visit` tests -- they would be better in `rustc_ast` -- but they still rely on parsing, which is not available in `rustc_ast`. But `rustc_parse` is lower down in the crate graph and closer to `rustc_ast` than `rust_expand`, so it's still an improvement for them. The exact renaming is as follows: - rustc_expand/src/mut_visit/tests.rs -> rustc_parse/src/parser/mut_visit/tests.rs - rustc_expand/src/tokenstream/tests.rs -> rustc_parse/src/parser/tokenstream/tests.rs - rustc_expand/src/tests.rs + rustc_expand/src/parse/tests.rs -> compiler/rustc_parse/src/parser/tests.rs The latter two test files are combined because there's no need for them to be separate, and having a `rustc_parse::parser::parse` module would be weird. This also means some `pub(crate)`s can be removed.
2021-10-18rustc_ast: Turn `MutVisitor::token_visiting_enabled` into a constantVadim Petrochenkov-3/+2
It's a visitor property rather than something that needs to be determined at runtime
2021-07-08Rework SESSION_GLOBALS API to prevent overwriting itGuillaume Gomez-3/+3
2021-02-18ast: Stop using `Mod` in `Crate`Vadim Petrochenkov-4/+4
Crate root is sufficiently different from `mod` items, at least at syntactic level. Also remove customization point for "`mod` item or crate root" from AST visitors.
2020-11-03rustc_ast: `visit_mac` -> `visit_mac_call`Vadim Petrochenkov-1/+1
2020-11-03rustc_ast: Do not panic by default when visiting macro callsVadim Petrochenkov-3/+0
2020-11-03Expand `NtExpr` tokens only in key-value attributesVadim Petrochenkov-0/+3
2020-08-30mv compiler to compiler/mark-0/+73