Skip to content

Commit

Permalink
rustc_metadata: move comment closer to code
Browse files Browse the repository at this point in the history
This was added in cc3c8bb when it was
closer to the `extract_one` call. Move it back near that call.
  • Loading branch information
tamird committed Oct 15, 2024
1 parent 9322d18 commit 93cee99
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions compiler/rustc_metadata/src/locator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,11 @@ impl<'a> CrateLocator<'a> {
dylibs: FxIndexMap<PathBuf, PathKind>,
) -> Result<Option<(Svh, Library)>, CrateError> {
let mut slot = None;
// Order here matters, rmeta should come first. See comment in
// `extract_one` below.
// Order here matters, rmeta should come first.
//
// Make sure there's at most one rlib and at most one dylib.
//
// See comment in `extract_one` below.
let source = CrateSource {
rmeta: self.extract_one(rmetas, CrateFlavor::Rmeta, &mut slot)?,
rlib: self.extract_one(rlibs, CrateFlavor::Rlib, &mut slot)?,
Expand Down Expand Up @@ -729,7 +732,6 @@ impl<'a> CrateLocator<'a> {
|| file.starts_with(self.target.dll_prefix.as_ref())
&& file.ends_with(self.target.dll_suffix.as_ref())
{
// Make sure there's at most one rlib and at most one dylib.
// Note to take care and match against the non-canonicalized name:
// some systems save build artifacts into content-addressed stores
// that do not preserve extensions, and then link to them using
Expand Down

0 comments on commit 93cee99

Please sign in to comment.