Skip to content

Conversation

@alexcrichton
Copy link
Member

The right hand side of the comparison in these checks are values of type
Option<&Path> which are normalized versions of the left-hand side, so they're
not guaranteed to be byte-for-byte equivalent even though they're the same path.

For this reasons, the command line arguments are promoted to paths for
comparison of equality.

This fixes a bug on windows where if a library was specified with --extern it
would then be picked up twice because it was not considered to have been
previously registered.

The right hand side of the comparison in these checks are values of type
Option<&Path> which are normalized versions of the left-hand side, so they're
not guaranteed to be byte-for-byte equivalent even though they're the same path.

For this reasons, the command line arguments are promoted to paths for
comparison of equality.

This fixes a bug on windows where if a library was specified with --extern it
would then be picked up twice because it was not considered to have been
previously registered.
bors added a commit that referenced this pull request Jul 25, 2014
The right hand side of the comparison in these checks are values of type
Option<&Path> which are normalized versions of the left-hand side, so they're
not guaranteed to be byte-for-byte equivalent even though they're the same path.

For this reasons, the command line arguments are promoted to paths for
comparison of equality.

This fixes a bug on windows where if a library was specified with --extern it
would then be picked up twice because it was not considered to have been
previously registered.
@bors bors closed this Jul 25, 2014
@bors bors merged commit bd838a3 into rust-lang:master Jul 25, 2014
@alexcrichton alexcrichton deleted the hurray-for-windows branch August 1, 2014 16:51
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 4, 2023
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 31, 2025
Violets are red,
Roses are blue,
Ghosts haunt the night,
And pumpkins grin too.

-----

Meet @thefiddler's Mowgli and @bjornwein's Buffy, our winners at
rust-lang/rust-clippy#15670
It's our first dual winner of the Clippy Cat Changelog Contest!

<img width="1100" height="714" alt="image"
src="https://github.com/user-attachments/assets/ee9399d5-f8bd-45bb-a18c-c24a94817672"
/>

<img width="1664" height="1940" alt="image"
src="https://github.com/user-attachments/assets/2734c5df-2ebc-465f-89e4-5801f4d33678"
/>

-----

Cats for the next release can be traditionally nominated in the
comments.

changelog: none

r? flip1995
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants