File tree 1 file changed +6
-5
lines changed
compiler/rustc_metadata/src
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -577,11 +577,6 @@ impl<'a> CrateLocator<'a> {
577
577
) {
578
578
Ok ( blob) => {
579
579
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
- }
585
580
( h, blob)
586
581
} else {
587
582
info ! ( "metadata mismatch" ) ;
@@ -656,7 +651,12 @@ impl<'a> CrateLocator<'a> {
656
651
continue ;
657
652
}
658
653
}
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?
659
658
* slot = Some ( ( hash, metadata, lib. clone ( ) ) ) ;
659
+ }
660
660
ret = Some ( ( lib, kind) ) ;
661
661
}
662
662
@@ -747,6 +747,7 @@ impl<'a> CrateLocator<'a> {
747
747
let dll_prefix = self . target . dll_prefix . as_ref ( ) ;
748
748
let dll_suffix = self . target . dll_suffix . as_ref ( ) ;
749
749
if file. starts_with ( dll_prefix) && file. ends_with ( dll_suffix) {
750
+ rmetas. insert ( loc_canon. with_extension ( "rmeta" ) , PathKind :: ExternFlag ) ;
750
751
return Some ( dylibs) ;
751
752
}
752
753
None
You can’t perform that action at this time.
0 commit comments