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 "cannot move out of *self which is behind a shared reference" #2592

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Aug 21, 2023

Fixes #2591.

    error[E0507]: cannot move out of `*__self` which is behind a shared reference
       --> test_suite/tests/test_remote.rs:210:10
        |
    210 | #[derive(Serialize, Deserialize)]
        |          ^^^^^^^^^
        |          |
        |          data moved here
        |          move occurs because `unrecognized` has type `ErrorKind`, which does not implement the `Copy` trait
        |
        = note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
    help: consider borrowing here
        |
    210 | #[derive(&Serialize, Deserialize)]
        |          +
@dtolnay dtolnay merged commit 8b196ea into serde-rs:master Aug 21, 2023
14 checks passed
@dtolnay dtolnay deleted the remotenonexhaustive branch August 21, 2023 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1.0.184 might be causing a compilation error.
1 participant