rustc_metadata: Give a constructor to `CratePaths`
This commit is contained in:
parent
0aed810abf
commit
41ee980f9f
|
@ -207,7 +207,7 @@ impl<'a> CrateLoader<'a> {
|
|||
let root = if let Some(root) = root {
|
||||
root
|
||||
} else {
|
||||
crate_paths = CratePaths { name: crate_root.name, source: source.clone() };
|
||||
crate_paths = CratePaths::new(crate_root.name, source.clone());
|
||||
&crate_paths
|
||||
};
|
||||
|
||||
|
|
|
@ -281,8 +281,14 @@ crate struct CrateLocator<'a> {
|
|||
}
|
||||
|
||||
crate struct CratePaths {
|
||||
pub name: Symbol,
|
||||
pub source: CrateSource,
|
||||
name: Symbol,
|
||||
source: CrateSource,
|
||||
}
|
||||
|
||||
impl CratePaths {
|
||||
crate fn new(name: Symbol, source: CrateSource) -> CratePaths {
|
||||
CratePaths { name, source }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
|
|
Loading…
Reference in New Issue