Commit 1cea695
Prevent default derives for Forward declared types.
We do not know the layout for forward declared types.
Deriving Copy, Clone, Hash, PartialEq etc. is simply wrong.
Deriving Debug is debatable, since it can't print anything
useful. Since we previously would derive Debug, lets just
keep it, to avoid needless breaking changes.
Changed tests:
- func-return-must-use: Don't use forward declared structs in the
test, since that would result in wrong bindings!
- issue-1238-fwd-no-copy test no longer requires an annotation,
since Forward declared types should always be no copy
- forward-declaration-autoptr.rs: Manually implement clone.
The inner type is unknown, so requiring clone/copy is not correct.1 parent 5813198 commit 1cea695
21 files changed
Lines changed: 69 additions & 38 deletions
File tree
- bindgen-tests/tests
- expectations/tests
- headers
- bindgen
- codegen
- ir/analysis
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 24 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments