Skip to content

Commit 93cee99

Browse files
committed
rustc_metadata: move comment closer to code
This was added in cc3c8bb when it was closer to the `extract_one` call. Move it back near that call.
1 parent 9322d18 commit 93cee99

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

compiler/rustc_metadata/src/locator.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,11 @@ impl<'a> CrateLocator<'a> {
499499
dylibs: FxIndexMap<PathBuf, PathKind>,
500500
) -> Result<Option<(Svh, Library)>, CrateError> {
501501
let mut slot = None;
502-
// Order here matters, rmeta should come first. See comment in
503-
// `extract_one` below.
502+
// Order here matters, rmeta should come first.
503+
//
504+
// Make sure there's at most one rlib and at most one dylib.
505+
//
506+
// See comment in `extract_one` below.
504507
let source = CrateSource {
505508
rmeta: self.extract_one(rmetas, CrateFlavor::Rmeta, &mut slot)?,
506509
rlib: self.extract_one(rlibs, CrateFlavor::Rlib, &mut slot)?,
@@ -729,7 +732,6 @@ impl<'a> CrateLocator<'a> {
729732
|| file.starts_with(self.target.dll_prefix.as_ref())
730733
&& file.ends_with(self.target.dll_suffix.as_ref())
731734
{
732-
// Make sure there's at most one rlib and at most one dylib.
733735
// Note to take care and match against the non-canonicalized name:
734736
// some systems save build artifacts into content-addressed stores
735737
// that do not preserve extensions, and then link to them using

0 commit comments

Comments
 (0)