Skip to content

Generated code triggers private_in_public future compatibility warnings. #435

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

Closed
eddyb opened this issue Jul 11, 2016 · 0 comments · Fixed by #456
Closed

Generated code triggers private_in_public future compatibility warnings. #435

eddyb opened this issue Jul 11, 2016 · 0 comments · Fixed by #456
Assignees
Labels
Milestone

Comments

@eddyb
Copy link

eddyb commented Jul 11, 2016

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants