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

Fix noop deref warning #1082

Merged
merged 1 commit into from
Apr 20, 2024
Merged

Fix noop deref warning #1082

merged 1 commit into from
Apr 20, 2024

Conversation

LegNeato
Copy link
Contributor

Without this change compiling shows a warning:

warning: call to `.deref()` on a reference in this situation does nothing
    --> c2rust-transpile/src/cfg/mod.rs:2252:72
     |
2252 | ...to_string(pat.deref());
     |                 ^^^^^^^^ help: remove this redundant call
     |
     = note: the type `syn::Pat` does not implement `Deref`, so calling `deref` on `&syn::Pat` copies the reference, which does not do anything and can be removed
     = note: `#[warn(noop_method_call)]` on by default

Without this change compiling shows a warning:

```
warning: call to `.deref()` on a reference in this situation does nothing
    --> c2rust-transpile/src/cfg/mod.rs:2252:72
     |
2252 | ...to_string(pat.deref());
     |                 ^^^^^^^^ help: remove this redundant call
     |
     = note: the type `syn::Pat` does not implement `Deref`, so calling `deref` on `&syn::Pat` copies the reference, which does not do anything and can be removed
     = note: `#[warn(noop_method_call)]` on by default
```
@kkysen kkysen merged commit 2a6b735 into immunant:master Apr 20, 2024
8 of 9 checks passed
@LegNeato LegNeato deleted the patch-1 branch April 21, 2024 15:05
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.

2 participants