File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed
crates/cargo-test-support/src Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1521,6 +1521,7 @@ fn substitute_macros(input: &str) -> String {
15211521 ( "[ERROR]" , "error:" ) ,
15221522 ( "[WARNING]" , "warning:" ) ,
15231523 ( "[NOTE]" , "note:" ) ,
1524+ ( "[HELP]" , "help:" ) ,
15241525 ( "[DOCUMENTING]" , " Documenting" ) ,
15251526 ( "[FRESH]" , " Fresh" ) ,
15261527 ( "[UPDATING]" , " Updating" ) ,
Original file line number Diff line number Diff line change @@ -308,7 +308,8 @@ pub trait ArgMatchesExt {
308308 if self . _is_present ( flag) {
309309 bail ! (
310310 "--{} is not allowed in the root of a virtual workspace\n \
311- note: while this was previously accepted, it didn't actually do anything",
311+ note: while this was previously accepted, it didn't actually do anything\n \
312+ help: change the current directory to the package directory, or use the --manifest-path flag to the path of the package",
312313 flag
313314 ) ;
314315 }
Original file line number Diff line number Diff line change @@ -1939,15 +1939,17 @@ fn virtual_ws_flags() {
19391939 p. cargo ( "build --features=f1" )
19401940 . with_stderr (
19411941 "[ERROR] --features is not allowed in the root of a virtual workspace\n \
1942- note: while this was previously accepted, it didn't actually do anything",
1942+ [NOTE] while this was previously accepted, it didn't actually do anything\n \
1943+ [HELP] change the current directory to the package directory, or use the --manifest-path flag to the path of the package",
19431944 )
19441945 . with_status ( 101 )
19451946 . run ( ) ;
19461947
19471948 p. cargo ( "build --no-default-features" )
19481949 . with_stderr (
19491950 "[ERROR] --no-default-features is not allowed in the root of a virtual workspace\n \
1950- note: while this was previously accepted, it didn't actually do anything",
1951+ [NOTE] while this was previously accepted, it didn't actually do anything\n \
1952+ [HELP] change the current directory to the package directory, or use the --manifest-path flag to the path of the package",
19511953 )
19521954 . with_status ( 101 )
19531955 . run ( ) ;
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ fn virtual_no_default_features() {
5757 "\
5858 [ERROR] --no-default-features is not allowed in the root of a virtual workspace
5959[NOTE] while this was previously accepted, it didn't actually do anything
60+ [HELP] change the current directory to the package directory, or use the --manifest-path flag to the path of the package
6061" ,
6162 )
6263 . run ( ) ;
@@ -125,6 +126,7 @@ fn virtual_features() {
125126 "\
126127 [ERROR] --features is not allowed in the root of a virtual workspace
127128[NOTE] while this was previously accepted, it didn't actually do anything
129+ [HELP] change the current directory to the package directory, or use the --manifest-path flag to the path of the package
128130" ,
129131 )
130132 . run ( ) ;
@@ -202,6 +204,7 @@ fn virtual_with_specific() {
202204 "\
203205 [ERROR] --features is not allowed in the root of a virtual workspace
204206[NOTE] while this was previously accepted, it didn't actually do anything
207+ [HELP] change the current directory to the package directory, or use the --manifest-path flag to the path of the package
205208" ,
206209 )
207210 . run ( ) ;
@@ -371,6 +374,7 @@ fn virtual_member_slash() {
371374 "\
372375 [ERROR] --features is not allowed in the root of a virtual workspace
373376[NOTE] while this was previously accepted, it didn't actually do anything
377+ [HELP] change the current directory to the package directory, or use the --manifest-path flag to the path of the package
374378" ,
375379 )
376380 . run ( ) ;
You can’t perform that action at this time.
0 commit comments