diff options
Diffstat (limited to 'crates/project_model/src/cargo_workspace.rs')
-rw-r--r-- | crates/project_model/src/cargo_workspace.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/crates/project_model/src/cargo_workspace.rs b/crates/project_model/src/cargo_workspace.rs index f47898b9b..1d8d34a0b 100644 --- a/crates/project_model/src/cargo_workspace.rs +++ b/crates/project_model/src/cargo_workspace.rs | |||
@@ -44,6 +44,15 @@ impl ops::Index<Target> for CargoWorkspace { | |||
44 | } | 44 | } |
45 | } | 45 | } |
46 | 46 | ||
47 | /// Describes how to set the rustc source directory. | ||
48 | #[derive(Clone, Debug, PartialEq, Eq)] | ||
49 | pub enum RustcSource { | ||
50 | /// Explicit path for the rustc source directory. | ||
51 | Path(AbsPathBuf), | ||
52 | /// Try to automatically detect where the rustc source directory is. | ||
53 | Discover, | ||
54 | } | ||
55 | |||
47 | #[derive(Default, Clone, Debug, PartialEq, Eq)] | 56 | #[derive(Default, Clone, Debug, PartialEq, Eq)] |
48 | pub struct CargoConfig { | 57 | pub struct CargoConfig { |
49 | /// Do not activate the `default` feature. | 58 | /// Do not activate the `default` feature. |
@@ -64,7 +73,7 @@ pub struct CargoConfig { | |||
64 | pub no_sysroot: bool, | 73 | pub no_sysroot: bool, |
65 | 74 | ||
66 | /// rustc private crate source | 75 | /// rustc private crate source |
67 | pub rustc_source: Option<AbsPathBuf>, | 76 | pub rustc_source: Option<RustcSource>, |
68 | } | 77 | } |
69 | 78 | ||
70 | pub type Package = Idx<PackageData>; | 79 | pub type Package = Idx<PackageData>; |