mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 19:27:30 +03:00
8cbfb26383
This commit refactors `SourceMap` and most importantly `RealFileName` to make it self-contained in order to achieve cross-compiler consistency. This is achieved: - by making `RealFileName` immutable - by only having `SourceMap::to_real_filename` create `RealFileName` - by also making `RealFileName` holds it's working directory, it's embeddable name and the remapped scopes - by making most `FileName` and `RealFileName` methods take a scope as an argument In order for `SourceMap::to_real_filename` to know which scopes to apply `FilePathMapping` now takes the current remapping scopes to apply, which makes `FileNameDisplayPreference` and company useless and are removed. The scopes type `RemapPathScopeComponents` was moved from `rustc_session::config` to `rustc_span`. The previous system for scoping the local/remapped filenames `RemapFileNameExt::for_scope` is no longer useful as it's replaced by methods on `FileName` and `RealFileName`.
39 lines
1.0 KiB
TOML
39 lines
1.0 KiB
TOML
[package]
|
|
name = "rustc_session"
|
|
version = "0.0.0"
|
|
edition = "2024"
|
|
|
|
[dependencies]
|
|
# tidy-alphabetical-start
|
|
getopts = "0.2"
|
|
rand = "0.9.0"
|
|
rustc_abi = { path = "../rustc_abi" }
|
|
rustc_ast = { path = "../rustc_ast" }
|
|
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_fs_util = { path = "../rustc_fs_util" }
|
|
rustc_hashes = { path = "../rustc_hashes" }
|
|
rustc_hir = { path = "../rustc_hir" }
|
|
rustc_lint_defs = { path = "../rustc_lint_defs" }
|
|
rustc_macros = { path = "../rustc_macros" }
|
|
rustc_serialize = { path = "../rustc_serialize" }
|
|
rustc_span = { path = "../rustc_span" }
|
|
rustc_target = { path = "../rustc_target" }
|
|
termize = "0.2"
|
|
tracing = "0.1"
|
|
# tidy-alphabetical-end
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
# tidy-alphabetical-start
|
|
libc = "0.2"
|
|
# tidy-alphabetical-end
|
|
|
|
[target.'cfg(windows)'.dependencies.windows]
|
|
version = "0.61.0"
|
|
features = [
|
|
"Win32_Foundation",
|
|
"Win32_System_LibraryLoader",
|
|
]
|