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

Do not generate implementation for clone for FAM #1664

Merged
merged 1 commit into from
Nov 3, 2019

Conversation

honggoff
Copy link
Contributor

@honggoff honggoff commented Nov 3, 2019

Flexible array members are represented in the generated binding by a
struct __IncompleteArrayField<T>. Since such members do not contain any
information about how big they are, it is impossible to automatically
clone or copy them, either in C or rust.

It looks like the implementation for Copy has already been removed with #1477. This change removes the remaining implementation for Clone.

Fixes #1431.

Flexible array members are represented in the generated binding by a
struct __IncompleteArrayField<T>. Since such members do not contain any
information about how big they are, it is impossible to automatically
clone or copy them, either in C or rust.

Fixes rust-lang#1431.
Copy link
Contributor

@emilio emilio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@emilio emilio merged commit ec85170 into rust-lang:master Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

__IncompleteArrayField shouldn't implement Clone / Copy.
3 participants