File tree 3 files changed +5
-3
lines changed
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ pub fn read_manifest(
106
106
& mut errors,
107
107
)
108
108
. map ( EitherManifest :: Real )
109
- } else {
109
+ } else if resolved_toml . workspace . is_some ( ) {
110
110
to_virtual_manifest (
111
111
contents,
112
112
document,
@@ -121,6 +121,8 @@ pub fn read_manifest(
121
121
& mut errors,
122
122
)
123
123
. map ( EitherManifest :: Virtual )
124
+ } else {
125
+ anyhow:: bail!( "manifest is missing either a `[package]` or a `[workspace]`" )
124
126
}
125
127
} ) ( )
126
128
. map_err ( |err| {
Original file line number Diff line number Diff line change @@ -398,7 +398,7 @@ fn cargo_compile_with_invalid_manifest() {
398
398
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
399
399
400
400
Caused by:
401
- virtual manifests must be configured with [workspace]
401
+ manifest is missing either a `[package]` or a ` [workspace]`
402
402
403
403
"# ] ] )
404
404
. run ( ) ;
Original file line number Diff line number Diff line change @@ -1876,7 +1876,7 @@ fn cargo_metadata_with_invalid_manifest() {
1876
1876
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
1877
1877
1878
1878
Caused by:
1879
- virtual manifests must be configured with [workspace]
1879
+ manifest is missing either a `[package]` or a ` [workspace]`
1880
1880
1881
1881
"# ] ] )
1882
1882
. run ( ) ;
You can’t perform that action at this time.
0 commit comments