mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
2acbe9c743
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.
31 lines
979 B
TOML
31 lines
979 B
TOML
[package]
|
|
name = "rustc_expand"
|
|
version = "0.0.0"
|
|
edition = "2021"
|
|
build = false
|
|
|
|
[lib]
|
|
doctest = false
|
|
|
|
[dependencies]
|
|
# tidy-alphabetical-start
|
|
rustc_ast = { path = "../rustc_ast" }
|
|
rustc_ast_passes = { path = "../rustc_ast_passes" }
|
|
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
|
|
rustc_attr = { path = "../rustc_attr" }
|
|
rustc_data_structures = { path = "../rustc_data_structures" }
|
|
rustc_errors = { path = "../rustc_errors" }
|
|
rustc_feature = { path = "../rustc_feature" }
|
|
rustc_fluent_macro = { path = "../rustc_fluent_macro" }
|
|
rustc_lexer = { path = "../rustc_lexer" }
|
|
rustc_lint_defs = { path = "../rustc_lint_defs" }
|
|
rustc_macros = { path = "../rustc_macros" }
|
|
rustc_parse = { path = "../rustc_parse" }
|
|
rustc_serialize = { path = "../rustc_serialize" }
|
|
rustc_session = { path = "../rustc_session" }
|
|
rustc_span = { path = "../rustc_span" }
|
|
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
|
thin-vec = "0.2.12"
|
|
tracing = "0.1"
|
|
# tidy-alphabetical-end
|