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 @@ -580,11 +580,6 @@ impl<'a> CrateLocator<'a> {
580
580
) {
581
581
Ok ( blob) => {
582
582
if let Some ( h) = self . crate_matches ( & blob, & lib) {
583
- if blob. get_header ( ) . is_reference {
584
- if slot. is_none ( ) {
585
- todo ! ( "return error" ) ;
586
- }
587
- }
588
583
( h, blob)
589
584
} else {
590
585
info ! ( "metadata mismatch" ) ;
@@ -659,7 +654,12 @@ impl<'a> CrateLocator<'a> {
659
654
continue ;
660
655
}
661
656
}
662
- * slot = Some ( ( hash, metadata, lib. clone ( ) ) ) ;
657
+
658
+ if !metadata. get_header ( ) . is_reference {
659
+ // FIXME nicer error when only an rlib or dylib with is_reference is found
660
+ // and no .rmeta?
661
+ * slot = Some ( ( hash, metadata, lib. clone ( ) ) ) ;
662
+ }
663
663
ret = Some ( ( lib, kind) ) ;
664
664
}
665
665
@@ -750,6 +750,7 @@ impl<'a> CrateLocator<'a> {
750
750
let dll_prefix = self . target . dll_prefix . as_ref ( ) ;
751
751
let dll_suffix = self . target . dll_suffix . as_ref ( ) ;
752
752
if file. starts_with ( dll_prefix) && file. ends_with ( dll_suffix) {
753
+ rmetas. insert ( loc_canon. with_extension ( "rmeta" ) , PathKind :: ExternFlag ) ;
753
754
return Some ( dylibs) ;
754
755
}
755
756
None
You can’t perform that action at this time.
0 commit comments