diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-11-04 15:49:57 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-11-26 18:02:42 +0000 |
| commit | 98a6eaa7f8436cbedc79a21fe3ec62e8a35ef392 (patch) | |
| tree | a6835944334c03cdcf17cacf468a088c95d854c5 /compiler/rustc_session | |
| parent | eacbe65dfea942f40bf475658a154292077fde07 (diff) | |
| download | rust-98a6eaa7f8436cbedc79a21fe3ec62e8a35ef392.tar.gz rust-98a6eaa7f8436cbedc79a21fe3ec62e8a35ef392.zip | |
Serialize OutputFilenames into rmeta file
This ensures that linking will use the correct crate name even when `#![crate_name = "..."]` is used to specify the crate name.
Diffstat (limited to 'compiler/rustc_session')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 2d2a3c3d665..d6e7afb7d09 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -580,7 +580,7 @@ pub enum ResolveDocLinks { /// *Do not* switch `BTreeMap` out for an unsorted container type! That would break /// dependency tracking for command-line arguments. Also only hash keys, since tracking /// should only depend on the output types, not the paths they're written to. -#[derive(Clone, Debug, Hash, HashStable_Generic)] +#[derive(Clone, Debug, Hash, HashStable_Generic, Encodable, Decodable)] pub struct OutputTypes(BTreeMap<OutputType, Option<OutFileName>>); impl OutputTypes { @@ -818,7 +818,7 @@ impl Input { } } -#[derive(Clone, Hash, Debug, HashStable_Generic, PartialEq)] +#[derive(Clone, Hash, Debug, HashStable_Generic, PartialEq, Encodable, Decodable)] pub enum OutFileName { Real(PathBuf), Stdout, @@ -890,7 +890,7 @@ impl OutFileName { } } -#[derive(Clone, Hash, Debug, HashStable_Generic)] +#[derive(Clone, Hash, Debug, HashStable_Generic, Encodable, Decodable)] pub struct OutputFilenames { pub out_directory: PathBuf, /// Crate name. Never contains '-'. |
