diff options
Diffstat (limited to 'crates/base_db/src')
-rw-r--r-- | crates/base_db/src/input.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/crates/base_db/src/input.rs b/crates/base_db/src/input.rs index 251a7b245..c330314d4 100644 --- a/crates/base_db/src/input.rs +++ b/crates/base_db/src/input.rs | |||
@@ -127,10 +127,11 @@ impl PartialEq for ProcMacro { | |||
127 | pub struct CrateData { | 127 | pub struct CrateData { |
128 | pub root_file_id: FileId, | 128 | pub root_file_id: FileId, |
129 | pub edition: Edition, | 129 | pub edition: Edition, |
130 | /// The name to display to the end user. | 130 | /// A name used in the package's project declaration: for Cargo projects, it's [package].name, |
131 | /// This actual crate name can be different in a particular dependent crate | 131 | /// can be different for other project types or even absent (a dummy crate for the code snippet, for example). |
132 | /// or may even be missing for some cases, such as a dummy crate for the code snippet. | 132 | /// NOTE: The crate can be referenced as a dependency under a different name, |
133 | pub display_name: Option<CrateName>, | 133 | /// this one should be used when working with crate hierarchies. |
134 | pub declaration_name: Option<CrateName>, | ||
134 | pub cfg_options: CfgOptions, | 135 | pub cfg_options: CfgOptions, |
135 | pub env: Env, | 136 | pub env: Env, |
136 | pub dependencies: Vec<Dependency>, | 137 | pub dependencies: Vec<Dependency>, |
@@ -159,7 +160,7 @@ impl CrateGraph { | |||
159 | &mut self, | 160 | &mut self, |
160 | file_id: FileId, | 161 | file_id: FileId, |
161 | edition: Edition, | 162 | edition: Edition, |
162 | display_name: Option<CrateName>, | 163 | declaration_name: Option<CrateName>, |
163 | cfg_options: CfgOptions, | 164 | cfg_options: CfgOptions, |
164 | env: Env, | 165 | env: Env, |
165 | proc_macro: Vec<(SmolStr, Arc<dyn tt::TokenExpander>)>, | 166 | proc_macro: Vec<(SmolStr, Arc<dyn tt::TokenExpander>)>, |
@@ -170,7 +171,7 @@ impl CrateGraph { | |||
170 | let data = CrateData { | 171 | let data = CrateData { |
171 | root_file_id: file_id, | 172 | root_file_id: file_id, |
172 | edition, | 173 | edition, |
173 | display_name, | 174 | declaration_name, |
174 | cfg_options, | 175 | cfg_options, |
175 | env, | 176 | env, |
176 | proc_macro, | 177 | proc_macro, |