@@ -300,7 +300,8 @@ pub struct CrateData {
300300 /// `Dependency` matters), this name should only be used for UI.
301301 pub display_name : Option < CrateDisplayName > ,
302302 pub cfg_options : CfgOptions ,
303- pub potential_cfg_options : CfgOptions ,
303+ /// The cfg options that could be used by the crate
304+ pub potential_cfg_options : Option < CfgOptions > ,
304305 pub env : Env ,
305306 pub dependencies : Vec < Dependency > ,
306307 pub origin : CrateOrigin ,
@@ -356,7 +357,7 @@ impl CrateGraph {
356357 display_name : Option < CrateDisplayName > ,
357358 version : Option < String > ,
358359 cfg_options : CfgOptions ,
359- potential_cfg_options : CfgOptions ,
360+ potential_cfg_options : Option < CfgOptions > ,
360361 env : Env ,
361362 is_proc_macro : bool ,
362363 origin : CrateOrigin ,
@@ -673,7 +674,7 @@ impl fmt::Display for CyclicDependenciesError {
673674mod tests {
674675 use crate :: CrateOrigin ;
675676
676- use super :: { CfgOptions , CrateGraph , CrateName , Dependency , Edition :: Edition2018 , Env , FileId } ;
677+ use super :: { CrateGraph , CrateName , Dependency , Edition :: Edition2018 , Env , FileId } ;
677678
678679 #[ test]
679680 fn detect_cyclic_dependency_indirect ( ) {
@@ -683,8 +684,8 @@ mod tests {
683684 Edition2018 ,
684685 None ,
685686 None ,
686- CfgOptions :: default ( ) ,
687- CfgOptions :: default ( ) ,
687+ Default :: default ( ) ,
688+ Default :: default ( ) ,
688689 Env :: default ( ) ,
689690 false ,
690691 CrateOrigin :: Local { repo : None , name : None } ,
@@ -696,8 +697,8 @@ mod tests {
696697 Edition2018 ,
697698 None ,
698699 None ,
699- CfgOptions :: default ( ) ,
700- CfgOptions :: default ( ) ,
700+ Default :: default ( ) ,
701+ Default :: default ( ) ,
701702 Env :: default ( ) ,
702703 false ,
703704 CrateOrigin :: Local { repo : None , name : None } ,
@@ -709,8 +710,8 @@ mod tests {
709710 Edition2018 ,
710711 None ,
711712 None ,
712- CfgOptions :: default ( ) ,
713- CfgOptions :: default ( ) ,
713+ Default :: default ( ) ,
714+ Default :: default ( ) ,
714715 Env :: default ( ) ,
715716 false ,
716717 CrateOrigin :: Local { repo : None , name : None } ,
@@ -736,8 +737,8 @@ mod tests {
736737 Edition2018 ,
737738 None ,
738739 None ,
739- CfgOptions :: default ( ) ,
740- CfgOptions :: default ( ) ,
740+ Default :: default ( ) ,
741+ Default :: default ( ) ,
741742 Env :: default ( ) ,
742743 false ,
743744 CrateOrigin :: Local { repo : None , name : None } ,
@@ -749,8 +750,8 @@ mod tests {
749750 Edition2018 ,
750751 None ,
751752 None ,
752- CfgOptions :: default ( ) ,
753- CfgOptions :: default ( ) ,
753+ Default :: default ( ) ,
754+ Default :: default ( ) ,
754755 Env :: default ( ) ,
755756 false ,
756757 CrateOrigin :: Local { repo : None , name : None } ,
@@ -773,8 +774,8 @@ mod tests {
773774 Edition2018 ,
774775 None ,
775776 None ,
776- CfgOptions :: default ( ) ,
777- CfgOptions :: default ( ) ,
777+ Default :: default ( ) ,
778+ Default :: default ( ) ,
778779 Env :: default ( ) ,
779780 false ,
780781 CrateOrigin :: Local { repo : None , name : None } ,
@@ -786,8 +787,8 @@ mod tests {
786787 Edition2018 ,
787788 None ,
788789 None ,
789- CfgOptions :: default ( ) ,
790- CfgOptions :: default ( ) ,
790+ Default :: default ( ) ,
791+ Default :: default ( ) ,
791792 Env :: default ( ) ,
792793 false ,
793794 CrateOrigin :: Local { repo : None , name : None } ,
@@ -799,8 +800,8 @@ mod tests {
799800 Edition2018 ,
800801 None ,
801802 None ,
802- CfgOptions :: default ( ) ,
803- CfgOptions :: default ( ) ,
803+ Default :: default ( ) ,
804+ Default :: default ( ) ,
804805 Env :: default ( ) ,
805806 false ,
806807 CrateOrigin :: Local { repo : None , name : None } ,
@@ -823,8 +824,8 @@ mod tests {
823824 Edition2018 ,
824825 None ,
825826 None ,
826- CfgOptions :: default ( ) ,
827- CfgOptions :: default ( ) ,
827+ Default :: default ( ) ,
828+ Default :: default ( ) ,
828829 Env :: default ( ) ,
829830 false ,
830831 CrateOrigin :: Local { repo : None , name : None } ,
@@ -836,8 +837,8 @@ mod tests {
836837 Edition2018 ,
837838 None ,
838839 None ,
839- CfgOptions :: default ( ) ,
840- CfgOptions :: default ( ) ,
840+ Default :: default ( ) ,
841+ Default :: default ( ) ,
841842 Env :: default ( ) ,
842843 false ,
843844 CrateOrigin :: Local { repo : None , name : None } ,
0 commit comments