@@ -49,6 +49,7 @@ pub enum Feature {
49
49
// `uefi` features.
50
50
Alloc ,
51
51
GlobalAllocator ,
52
+ LogDebugcon ,
52
53
Logger ,
53
54
Unstable ,
54
55
PanicHandler ,
@@ -68,6 +69,7 @@ impl Feature {
68
69
match self {
69
70
Self :: Alloc => "alloc" ,
70
71
Self :: GlobalAllocator => "global_allocator" ,
72
+ Self :: LogDebugcon => "log-debugcon" ,
71
73
Self :: Logger => "logger" ,
72
74
Self :: Unstable => "unstable" ,
73
75
Self :: PanicHandler => "panic_handler" ,
@@ -88,6 +90,7 @@ impl Feature {
88
90
Package :: Uefi => vec ! [
89
91
Self :: Alloc ,
90
92
Self :: GlobalAllocator ,
93
+ Self :: LogDebugcon ,
91
94
Self :: Logger ,
92
95
Self :: Unstable ,
93
96
Self :: PanicHandler ,
@@ -112,7 +115,7 @@ impl Feature {
112
115
/// - `include_unstable` - add all functionality behind the `unstable` feature
113
116
/// - `runtime_features` - add all functionality that effect the runtime of Rust
114
117
pub fn more_code ( include_unstable : bool , runtime_features : bool ) -> Vec < Self > {
115
- let mut base_features = vec ! [ Self :: Alloc , Self :: Logger ] ;
118
+ let mut base_features = vec ! [ Self :: Alloc , Self :: LogDebugcon , Self :: Logger ] ;
116
119
if include_unstable {
117
120
base_features. extend ( [ Self :: Unstable ] )
118
121
}
@@ -293,6 +296,10 @@ impl Cargo {
293
296
cmd. arg ( sub_action) ;
294
297
}
295
298
299
+ // Turn off default features so that `--feature-permutations` can test
300
+ // with each feature enabled and disabled.
301
+ cmd. arg ( "--no-default-features" ) ;
302
+
296
303
if self . release {
297
304
cmd. arg ( "--release" ) ;
298
305
}
@@ -337,19 +344,19 @@ mod tests {
337
344
fn test_comma_separated_features ( ) {
338
345
assert_eq ! (
339
346
Feature :: comma_separated_string( & Feature :: more_code( false , false ) ) ,
340
- "alloc,logger"
347
+ "alloc,log-debugcon, logger"
341
348
) ;
342
349
assert_eq ! (
343
350
Feature :: comma_separated_string( & Feature :: more_code( false , true ) ) ,
344
- "alloc,logger,global_allocator"
351
+ "alloc,log-debugcon, logger,global_allocator"
345
352
) ;
346
353
assert_eq ! (
347
354
Feature :: comma_separated_string( & Feature :: more_code( true , false ) ) ,
348
- "alloc,logger,unstable"
355
+ "alloc,log-debugcon, logger,unstable"
349
356
) ;
350
357
assert_eq ! (
351
358
Feature :: comma_separated_string( & Feature :: more_code( true , true ) ) ,
352
- "alloc,logger,unstable,global_allocator"
359
+ "alloc,log-debugcon, logger,unstable,global_allocator"
353
360
) ;
354
361
}
355
362
@@ -380,7 +387,7 @@ mod tests {
380
387
} ;
381
388
assert_eq ! (
382
389
command_to_string( & cargo. command( ) . unwrap( ) ) ,
383
- "RUSTDOCFLAGS=-Dwarnings cargo doc --package uefi --package xtask --features global_allocator --no-deps --document-private-items --open"
390
+ "RUSTDOCFLAGS=-Dwarnings cargo doc --no-default-features -- package uefi --package xtask --features global_allocator --no-deps --document-private-items --open"
384
391
) ;
385
392
}
386
393
}
0 commit comments