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