-
Notifications
You must be signed in to change notification settings - Fork 13.3k
assert_eq!() cannot be used on Path #15625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is there any reason why |
This can probably be closed. |
Yep, I can use |
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Sep 18, 2023
fix: Don't skip closure captures after let-else As I understand that `return` was left there by accident. It caused capture analysis to skip the rest of the block after a let-else, and then missed captures caused incorrect results in borrowck, closure hints, layout calculation, etc. Fixes rust-lang#15623 I didn't understand why I using the example from rust-lang#15623 as-is doesn't work - I don't get the warnings unless I remove the `call_me()` call, even on the same commit as my own RA version which does show those warnings.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since
Path
isn'tShow
, it can't be used. This would be useful, for when you're actually comparing some container ofPath
, such asOption<Path>
orVec<Path>
.As an alternative, I tried
.map(|p| p.display())
on both sides, butDisplay
doesn't implPartialEq
, so it can't be used either. That means either.as_str().unwrap()
, or just give up on the nicely printed failure and use plainassert!
The text was updated successfully, but these errors were encountered: