File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,10 @@ pub enum SpirvBuilderError {
129129 MetadataFileMissing ( #[ from] std:: io:: Error ) ,
130130 #[ error( "unable to parse multi-module metadata file" ) ]
131131 MetadataFileMalformed ( #[ from] serde_json:: Error ) ,
132+ #[ error(
133+ "`{ARTIFACT_SUFFIX}` artifact not found in (supposedly successful) build output.\n --- build output ---\n {stdout}"
134+ ) ]
135+ NoArtifactProduced { stdout : String } ,
132136 #[ error( "cargo metadata error" ) ]
133137 CargoMetadata ( #[ from] cargo_metadata:: Error ) ,
134138 #[ cfg( feature = "watch" ) ]
@@ -1096,12 +1100,7 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {
10961100 // that ended up on stdout instead of stderr.
10971101 let stdout = String :: from_utf8 ( build. stdout ) . unwrap ( ) ;
10981102 if build. status . success ( ) {
1099- get_sole_artifact ( & stdout) . ok_or_else ( || {
1100- eprintln ! ( "--- build output ---\n {stdout}" ) ;
1101- panic ! (
1102- "`{ARTIFACT_SUFFIX}` artifact not found in (supposedly successful) build output (see above). Verify that `crate-type` is set correctly"
1103- ) ;
1104- } )
1103+ get_sole_artifact ( & stdout) . ok_or ( SpirvBuilderError :: NoArtifactProduced { stdout } )
11051104 } else {
11061105 Err ( SpirvBuilderError :: BuildFailed )
11071106 }
You can’t perform that action at this time.
0 commit comments