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.
This commit is contained in:
parent
eacbe65dfe
commit
98a6eaa7f8
5 changed files with 22 additions and 27 deletions
|
@ -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 '-'.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue