Skip to content
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

Missing consider borrowing here message when comparing uuid::Uuid to &uuid::Uuid #57621

Open
thedrow opened this issue Jan 15, 2019 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix`. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@thedrow
Copy link

thedrow commented Jan 15, 2019

The following error:

error[E0277]: can't compare `&uuid::Uuid` with `uuid::Uuid`                     
  --> tests/test_tasks.rs:11:5                                                  
   |                                                                            
11 |     assert_eq!(task.id(), task_id);                                        
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `&uuid::Uuid == uuid::Uuid`
   = help: the trait `std::cmp::PartialEq<uuid::Uuid>` is not implemented for `&uuid::Uuid`
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

would be much clearer if the rust compiler would suggest to borrow task_id.

@Centril Centril added the A-diagnostics Area: Messages for errors, warnings, and lints label Jan 16, 2019
@estebank estebank added A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix`. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 5, 2019
@crlf0710 crlf0710 added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix`. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants