@@ -101,14 +101,14 @@ pub enum SpirvBuilderError {
101101 UnsupportedSpirvTargetEnv { target_env : String } ,
102102 #[ error( "`path_to_crate` must be set" ) ]
103103 MissingCratePath ,
104- #[ error( "crate path {0} does not exist" ) ]
104+ #[ error( "crate path ' {0}' does not exist" ) ]
105105 CratePathDoesntExist ( PathBuf ) ,
106106 #[ error(
107- "Without feature `compile_codegen `, you need to set the path of the codegen dylib using `rustc_codegen_spirv_location(...)`"
107+ "Without feature `rustc_codegen_spirv `, you need to set the path of the dylib using `rustc_codegen_spirv_location(...)`"
108108 ) ]
109- MissingCodegenBackendDylib ,
109+ MissingRustcCodegenSpirvDylib ,
110110 #[ error( "`rustc_codegen_spirv_location` path '{0}' is not a file" ) ]
111- CodegenBackendDylibDoesNotExist ( PathBuf ) ,
111+ RustcCodegenSpirvDylibDoesNotExist ( PathBuf ) ,
112112 #[ error( "build failed" ) ]
113113 BuildFailed ,
114114 #[ error( "multi-module build cannot be used with print_metadata = MetadataPrintout::Full" ) ]
@@ -353,7 +353,7 @@ pub struct SpirvBuilder {
353353 /// Set additional "codegen arg". Note: the `RUSTGPU_CODEGEN_ARGS` environment variable
354354 /// takes precedence over any set arguments using this function.
355355 pub extra_args : Vec < String > ,
356- // Optional location of a known `rustc_codegen_spirv` dylib
356+ // Location of a known `rustc_codegen_spirv` dylib, only required without feature `rustc_codegen_spirv`.
357357 pub rustc_codegen_spirv_location : Option < std:: path:: PathBuf > ,
358358
359359 /// The path of the "target specification" file.
@@ -641,7 +641,7 @@ fn dylib_path() -> Vec<PathBuf> {
641641}
642642
643643fn find_rustc_codegen_spirv ( ) -> Result < PathBuf , SpirvBuilderError > {
644- if cfg ! ( feature = "compile_codegen " ) {
644+ if cfg ! ( feature = "rustc_codegen_spirv " ) {
645645 let filename = format ! (
646646 "{}rustc_codegen_spirv{}" ,
647647 env:: consts:: DLL_PREFIX ,
@@ -655,7 +655,7 @@ fn find_rustc_codegen_spirv() -> Result<PathBuf, SpirvBuilderError> {
655655 }
656656 panic ! ( "Could not find {filename} in library path" ) ;
657657 } else {
658- Err ( SpirvBuilderError :: MissingCodegenBackendDylib )
658+ Err ( SpirvBuilderError :: MissingRustcCodegenSpirvDylib )
659659 }
660660}
661661
@@ -726,7 +726,7 @@ fn invoke_rustc(builder: &SpirvBuilder) -> Result<PathBuf, SpirvBuilderError> {
726726 . transpose ( )
727727 . unwrap_or_else ( find_rustc_codegen_spirv) ?;
728728 if !rustc_codegen_spirv. is_file ( ) {
729- return Err ( SpirvBuilderError :: CodegenBackendDylibDoesNotExist (
729+ return Err ( SpirvBuilderError :: RustcCodegenSpirvDylibDoesNotExist (
730730 rustc_codegen_spirv,
731731 ) ) ;
732732 }
0 commit comments