File tree 1 file changed +7
-0
lines changed
compiler/rustc_metadata/src
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -399,6 +399,13 @@ impl<'a> CrateLocator<'a> {
399
399
// of the crate id (path/name/id).
400
400
//
401
401
// The goal of this step is to look at as little metadata as possible.
402
+ // Unfortunately, the prefix-based matching sometimes is over-eager.
403
+ // E.g. if `rlib_suffix` is `libstd` it'll match the file
404
+ // `libstd_detect-8d6701fb958915ad.rlib` (incorrect) as well as
405
+ // `libstd-f3ab5b1dea981f17.rlib` (correct). But this is hard to avoid
406
+ // given that `extra_filename` comes from the `-C extra-filename`
407
+ // option and thus can be anything, and the incorrect match will be
408
+ // handled safely in `extract_one`.
402
409
for search_path in self . filesearch . search_paths ( ) {
403
410
debug ! ( "searching {}" , search_path. dir. display( ) ) ;
404
411
for spf in search_path. files . iter ( ) {
You can’t perform that action at this time.
0 commit comments