Skip to content

Generated code triggers private_in_public future compatibility warnings. #435

@eddyb

Description

@eddyb

If a private field of a public type contains a private type, the generated bounds result in warnings such as (example from Servo):

<quote expansion>:1:12: 1:22 warning: private type in public interface, #[warn(private_in_public)] on by default
<quote expansion>:1  where Vec<GlyphEntry>: _serde::ser::Serialize,
                               ^~~~~~~~~~
<quote expansion>:1:12: 1:22 warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
<quote expansion>:1:12: 1:22 note: for more information, see the explanation for E0446 (`--explain E0446`)

See rust-lang/rfcs#1671 (comment) for more on the possible future of private types in bounds (i.e. no action may be necessary in the future if that RFC gets through).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions