File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
compiler/rustc_metadata/src Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -577,11 +577,6 @@ impl<'a> CrateLocator<'a> {
577577 ) {
578578 Ok ( blob) => {
579579 if let Some ( h) = self . crate_matches ( & blob, & lib) {
580- if blob. get_header ( ) . is_reference {
581- if slot. is_none ( ) {
582- todo ! ( "return error" ) ;
583- }
584- }
585580 ( h, blob)
586581 } else {
587582 info ! ( "metadata mismatch" ) ;
@@ -656,7 +651,12 @@ impl<'a> CrateLocator<'a> {
656651 continue ;
657652 }
658653 }
659- * slot = Some ( ( hash, metadata, lib. clone ( ) ) ) ;
654+
655+ if !metadata. get_header ( ) . is_reference {
656+ // FIXME nicer error when only an rlib or dylib with is_reference is found
657+ // and no .rmeta?
658+ * slot = Some ( ( hash, metadata, lib. clone ( ) ) ) ;
659+ }
660660 ret = Some ( ( lib, kind) ) ;
661661 }
662662
@@ -747,6 +747,7 @@ impl<'a> CrateLocator<'a> {
747747 let dll_prefix = self . target . dll_prefix . as_ref ( ) ;
748748 let dll_suffix = self . target . dll_suffix . as_ref ( ) ;
749749 if file. starts_with ( dll_prefix) && file. ends_with ( dll_suffix) {
750+ rmetas. insert ( loc_canon. with_extension ( "rmeta" ) , PathKind :: ExternFlag ) ;
750751 return Some ( dylibs) ;
751752 }
752753 None
You can’t perform that action at this time.
0 commit comments