@@ -183,7 +183,7 @@ fn build_feature_map(
183
183
( * feature, fvs)
184
184
} )
185
185
. collect ( ) ;
186
- let has_namespaced_features = map. values ( ) . flatten ( ) . any ( |fv| fv. is_explicit_crate ( ) ) ;
186
+ let has_namespaced_features = map. values ( ) . flatten ( ) . any ( |fv| fv. has_crate_prefix ( ) ) ;
187
187
188
188
// Add implicit features for optional dependencies if they weren't
189
189
// explicitly listed anywhere.
@@ -194,7 +194,7 @@ fn build_feature_map(
194
194
Crate { dep_name }
195
195
| CrateFeature {
196
196
dep_name,
197
- explicit : true ,
197
+ crate_prefix : true ,
198
198
..
199
199
} => Some ( * dep_name) ,
200
200
_ => None ,
@@ -340,7 +340,7 @@ pub enum FeatureValue {
340
340
dep_feature : InternedString ,
341
341
/// If this is true, then the feature used the `crate:` prefix, which
342
342
/// prevents enabling the feature named `dep_name`.
343
- explicit : bool ,
343
+ crate_prefix : bool ,
344
344
} ,
345
345
}
346
346
@@ -350,15 +350,15 @@ impl FeatureValue {
350
350
Some ( pos) => {
351
351
let ( dep, dep_feat) = feature. split_at ( pos) ;
352
352
let dep_feat = & dep_feat[ 1 ..] ;
353
- let ( dep, explicit ) = if let Some ( dep) = dep. strip_prefix ( "crate:" ) {
353
+ let ( dep, crate_prefix ) = if let Some ( dep) = dep. strip_prefix ( "crate:" ) {
354
354
( dep, true )
355
355
} else {
356
356
( dep, false )
357
357
} ;
358
358
FeatureValue :: CrateFeature {
359
359
dep_name : InternedString :: new ( dep) ,
360
360
dep_feature : InternedString :: new ( dep_feat) ,
361
- explicit ,
361
+ crate_prefix ,
362
362
}
363
363
}
364
364
None if feature. starts_with ( "crate:" ) => FeatureValue :: Crate {
@@ -369,8 +369,8 @@ impl FeatureValue {
369
369
}
370
370
371
371
/// Returns `true` if this feature explicitly used `crate:` syntax.
372
- pub fn is_explicit_crate ( & self ) -> bool {
373
- matches ! ( self , FeatureValue :: Crate { ..} | FeatureValue :: CrateFeature { explicit : true , ..} )
372
+ pub fn has_crate_prefix ( & self ) -> bool {
373
+ matches ! ( self , FeatureValue :: Crate { ..} | FeatureValue :: CrateFeature { crate_prefix : true , ..} )
374
374
}
375
375
}
376
376
@@ -383,12 +383,12 @@ impl fmt::Display for FeatureValue {
383
383
CrateFeature {
384
384
dep_name,
385
385
dep_feature,
386
- explicit : true ,
386
+ crate_prefix : true ,
387
387
} => write ! ( f, "crate:{}/{}" , dep_name, dep_feature) ,
388
388
CrateFeature {
389
389
dep_name,
390
390
dep_feature,
391
- explicit : false ,
391
+ crate_prefix : false ,
392
392
} => write ! ( f, "{}/{}" , dep_name, dep_feature) ,
393
393
}
394
394
}
0 commit comments