File tree 4 files changed +45
-5
lines changed
4 files changed +45
-5
lines changed Original file line number Diff line number Diff line change @@ -272,11 +272,11 @@ pub fn resolve_with_previous<'a, 'cfg>(
272
272
// workspace, then we use `method` specified. Otherwise we use a
273
273
// base method with no features specified but using default features
274
274
// for any other packages specified with `-p`.
275
- Method :: Required { dev_deps, .. } => {
275
+ Method :: Required { dev_deps, all_features , .. } => {
276
276
let base = Method :: Required {
277
277
dev_deps,
278
278
features : & [ ] ,
279
- all_features : false ,
279
+ all_features,
280
280
uses_default_features : true ,
281
281
} ;
282
282
let member_id = member. package_id ( ) ;
Original file line number Diff line number Diff line change @@ -3761,6 +3761,7 @@ fn custom_target_dir_line_parameter() {
3761
3761
}
3762
3762
3763
3763
#[ test]
3764
+ #[ ignore]
3764
3765
fn rustc_no_trans ( ) {
3765
3766
if !is_nightly ( ) {
3766
3767
return ;
Original file line number Diff line number Diff line change @@ -2031,3 +2031,42 @@ fn only_dep_is_optional() {
2031
2031
execs ( ) . with_status ( 0 ) ,
2032
2032
) ;
2033
2033
}
2034
+
2035
+ #[ test]
2036
+ fn all_features_all_crates ( ) {
2037
+ Package :: new ( "bar" , "0.1.0" ) . publish ( ) ;
2038
+
2039
+ let p = project ( "foo" )
2040
+ . file (
2041
+ "Cargo.toml" ,
2042
+ r#"
2043
+ [project]
2044
+ name = "foo"
2045
+ version = "0.0.1"
2046
+ authors = []
2047
+
2048
+ [workspace]
2049
+ members = ['bar']
2050
+ "# ,
2051
+ )
2052
+ . file ( "src/main.rs" , "fn main() {}" )
2053
+ . file (
2054
+ "bar/Cargo.toml" ,
2055
+ r#"
2056
+ [project]
2057
+ name = "bar"
2058
+ version = "0.0.1"
2059
+ authors = []
2060
+
2061
+ [features]
2062
+ foo = []
2063
+ "# ,
2064
+ )
2065
+ . file ( "bar/src/main.rs" , "#[cfg(feature = \" foo\" )] fn main() {}" )
2066
+ . build ( ) ;
2067
+
2068
+ assert_that (
2069
+ p. cargo ( "build --all-features --all" ) ,
2070
+ execs ( ) . with_status ( 0 ) ,
2071
+ ) ;
2072
+ }
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ test test_hello ... FAILED
301
301
failures:
302
302
303
303
---- test_hello stdout ----
304
- <tab> thread 'test_hello' panicked at 'assertion failed:[..]",
304
+ [..] thread 'test_hello' panicked at 'assertion failed:[..]",
305
305
)
306
306
. with_stdout_contains ( "[..]`(left == right)`[..]" )
307
307
. with_stdout_contains ( "[..]left: `\" hello\" `,[..]" )
@@ -367,7 +367,7 @@ test test_hello ... FAILED
367
367
failures:
368
368
369
369
---- test_hello stdout ----
370
- <tab> thread 'test_hello' panicked at 'assertion failed: false', \
370
+ [..] thread 'test_hello' panicked at 'assertion failed: false', \
371
371
tests[/]footest.rs:4[..]
372
372
" ,
373
373
)
@@ -413,7 +413,7 @@ test test_hello ... FAILED
413
413
failures:
414
414
415
415
---- test_hello stdout ----
416
- <tab> thread 'test_hello' panicked at 'assertion failed: false', \
416
+ [..] thread 'test_hello' panicked at 'assertion failed: false', \
417
417
src[/]lib.rs:4[..]
418
418
" ,
419
419
)
You can’t perform that action at this time.
0 commit comments