aboutsummaryrefslogtreecommitdiff
path: root/crates/base_db/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/base_db/src')
-rw-r--r--crates/base_db/src/fixture.rs3
-rw-r--r--crates/base_db/src/input.rs13
2 files changed, 16 insertions, 0 deletions
diff --git a/crates/base_db/src/fixture.rs b/crates/base_db/src/fixture.rs
index 6ce377710..7d5d12e63 100644
--- a/crates/base_db/src/fixture.rs
+++ b/crates/base_db/src/fixture.rs
@@ -128,6 +128,7 @@ impl ChangeFixture {
128 file_id, 128 file_id,
129 meta.edition, 129 meta.edition,
130 Some(crate_name.clone().into()), 130 Some(crate_name.clone().into()),
131 meta.cfg.clone(),
131 meta.cfg, 132 meta.cfg,
132 meta.env, 133 meta.env,
133 Default::default(), 134 Default::default(),
@@ -157,6 +158,7 @@ impl ChangeFixture {
157 crate_root, 158 crate_root,
158 Edition::Edition2018, 159 Edition::Edition2018,
159 Some(CrateName::new("test").unwrap().into()), 160 Some(CrateName::new("test").unwrap().into()),
161 default_cfg.clone(),
160 default_cfg, 162 default_cfg,
161 Env::default(), 163 Env::default(),
162 Default::default(), 164 Default::default(),
@@ -186,6 +188,7 @@ impl ChangeFixture {
186 Edition::Edition2021, 188 Edition::Edition2021,
187 Some(CrateDisplayName::from_canonical_name("core".to_string())), 189 Some(CrateDisplayName::from_canonical_name("core".to_string())),
188 CfgOptions::default(), 190 CfgOptions::default(),
191 CfgOptions::default(),
189 Env::default(), 192 Env::default(),
190 Vec::new(), 193 Vec::new(),
191 ); 194 );
diff --git a/crates/base_db/src/input.rs b/crates/base_db/src/input.rs
index 23cb0c839..0c51a59a0 100644
--- a/crates/base_db/src/input.rs
+++ b/crates/base_db/src/input.rs
@@ -189,6 +189,7 @@ pub struct CrateData {
189 /// `Dependency` matters), this name should only be used for UI. 189 /// `Dependency` matters), this name should only be used for UI.
190 pub display_name: Option<CrateDisplayName>, 190 pub display_name: Option<CrateDisplayName>,
191 pub cfg_options: CfgOptions, 191 pub cfg_options: CfgOptions,
192 pub potential_cfg_options: CfgOptions,
192 pub env: Env, 193 pub env: Env,
193 pub dependencies: Vec<Dependency>, 194 pub dependencies: Vec<Dependency>,
194 pub proc_macro: Vec<ProcMacro>, 195 pub proc_macro: Vec<ProcMacro>,
@@ -219,6 +220,7 @@ impl CrateGraph {
219 edition: Edition, 220 edition: Edition,
220 display_name: Option<CrateDisplayName>, 221 display_name: Option<CrateDisplayName>,
221 cfg_options: CfgOptions, 222 cfg_options: CfgOptions,
223 potential_cfg_options: CfgOptions,
222 env: Env, 224 env: Env,
223 proc_macro: Vec<ProcMacro>, 225 proc_macro: Vec<ProcMacro>,
224 ) -> CrateId { 226 ) -> CrateId {
@@ -227,6 +229,7 @@ impl CrateGraph {
227 edition, 229 edition,
228 display_name, 230 display_name,
229 cfg_options, 231 cfg_options,
232 potential_cfg_options,
230 env, 233 env,
231 proc_macro, 234 proc_macro,
232 dependencies: Vec::new(), 235 dependencies: Vec::new(),
@@ -504,6 +507,7 @@ mod tests {
504 Edition2018, 507 Edition2018,
505 None, 508 None,
506 CfgOptions::default(), 509 CfgOptions::default(),
510 CfgOptions::default(),
507 Env::default(), 511 Env::default(),
508 Default::default(), 512 Default::default(),
509 ); 513 );
@@ -512,6 +516,7 @@ mod tests {
512 Edition2018, 516 Edition2018,
513 None, 517 None,
514 CfgOptions::default(), 518 CfgOptions::default(),
519 CfgOptions::default(),
515 Env::default(), 520 Env::default(),
516 Default::default(), 521 Default::default(),
517 ); 522 );
@@ -520,6 +525,7 @@ mod tests {
520 Edition2018, 525 Edition2018,
521 None, 526 None,
522 CfgOptions::default(), 527 CfgOptions::default(),
528 CfgOptions::default(),
523 Env::default(), 529 Env::default(),
524 Default::default(), 530 Default::default(),
525 ); 531 );
@@ -536,6 +542,7 @@ mod tests {
536 Edition2018, 542 Edition2018,
537 None, 543 None,
538 CfgOptions::default(), 544 CfgOptions::default(),
545 CfgOptions::default(),
539 Env::default(), 546 Env::default(),
540 Default::default(), 547 Default::default(),
541 ); 548 );
@@ -544,6 +551,7 @@ mod tests {
544 Edition2018, 551 Edition2018,
545 None, 552 None,
546 CfgOptions::default(), 553 CfgOptions::default(),
554 CfgOptions::default(),
547 Env::default(), 555 Env::default(),
548 Default::default(), 556 Default::default(),
549 ); 557 );
@@ -559,6 +567,7 @@ mod tests {
559 Edition2018, 567 Edition2018,
560 None, 568 None,
561 CfgOptions::default(), 569 CfgOptions::default(),
570 CfgOptions::default(),
562 Env::default(), 571 Env::default(),
563 Default::default(), 572 Default::default(),
564 ); 573 );
@@ -567,6 +576,7 @@ mod tests {
567 Edition2018, 576 Edition2018,
568 None, 577 None,
569 CfgOptions::default(), 578 CfgOptions::default(),
579 CfgOptions::default(),
570 Env::default(), 580 Env::default(),
571 Default::default(), 581 Default::default(),
572 ); 582 );
@@ -575,6 +585,7 @@ mod tests {
575 Edition2018, 585 Edition2018,
576 None, 586 None,
577 CfgOptions::default(), 587 CfgOptions::default(),
588 CfgOptions::default(),
578 Env::default(), 589 Env::default(),
579 Default::default(), 590 Default::default(),
580 ); 591 );
@@ -590,6 +601,7 @@ mod tests {
590 Edition2018, 601 Edition2018,
591 None, 602 None,
592 CfgOptions::default(), 603 CfgOptions::default(),
604 CfgOptions::default(),
593 Env::default(), 605 Env::default(),
594 Default::default(), 606 Default::default(),
595 ); 607 );
@@ -598,6 +610,7 @@ mod tests {
598 Edition2018, 610 Edition2018,
599 None, 611 None,
600 CfgOptions::default(), 612 CfgOptions::default(),
613 CfgOptions::default(),
601 Env::default(), 614 Env::default(),
602 Default::default(), 615 Default::default(),
603 ); 616 );