Skip to content

warning: zero-sized fields in repr(transparent) cannot contain external non-exhaustive types #13

@SoniEx2

Description

@SoniEx2

This seems like a problem for being able to use generativity:

warning: zero-sized fields in repr(transparent) cannot contain external non-exhaustive types
 --> src/lib.rs:6:39
  |
6 | pub struct BOption<'id, T>(Option<T>, Id<'id>);
  |                                       ^^^^^^^
  |
  = note: `#[warn(repr_transparent_external_private_fields)]` on by default
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: for more information, see issue #78586 <https://github.com/rust-lang/rust/issues/78586>
  = note: this struct contains `Id<'id>`, which contains private fields, and makes it not a breaking change to become non-zero-sized in the future.

But maybe we're using it wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions