@@ -141,10 +141,10 @@ pub fn resolve_lib(
141
141
let Some ( mut lib) = lib else { return Ok ( None ) } ;
142
142
lib. name
143
143
. get_or_insert_with ( || package_name. replace ( "-" , "_" ) ) ;
144
+
144
145
// Check early to improve error messages
145
146
validate_lib_name ( & lib, warnings) ?;
146
147
147
- // Checking the original lib
148
148
validate_proc_macro ( & lib, "library" , edition, warnings) ?;
149
149
validate_crate_types ( & lib, "library" , edition, warnings) ?;
150
150
@@ -276,7 +276,9 @@ pub fn resolve_bins(
276
276
) ;
277
277
278
278
for bin in & mut bins {
279
+ // Check early to improve error messages
279
280
validate_bin_name ( bin, warnings) ?;
281
+
280
282
validate_bin_crate_types ( bin, edition, warnings, errors) ?;
281
283
validate_bin_proc_macro ( bin, edition, warnings, errors) ?;
282
284
@@ -587,7 +589,9 @@ fn resolve_targets_with_legacy_path(
587
589
) ;
588
590
589
591
for target in & toml_targets {
592
+ // Check early to improve error messages
590
593
validate_target_name ( target, target_kind_human, target_kind, warnings) ?;
594
+
591
595
validate_proc_macro ( target, target_kind_human, edition, warnings) ?;
592
596
validate_crate_types ( target, target_kind_human, edition, warnings) ?;
593
597
}
0 commit comments