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

Erroneous E0603, public field cannot be re-exported on beta/nightly #56247

Closed
drbawb opened this issue Nov 26, 2018 · 2 comments
Closed

Erroneous E0603, public field cannot be re-exported on beta/nightly #56247

drbawb opened this issue Nov 26, 2018 · 2 comments
Labels
A-visibility Area: Visibility / privacy regression-from-stable-to-beta Performance or correctness regression from stable to beta.

Comments

@drbawb
Copy link

drbawb commented Nov 26, 2018

I am seeing a regression in the following versions of rustc:

  • rustc 1.32.0-nightly (6acbb5b65 2018-11-25)
  • rustc 1.31.0-beta.17 (1a4f1f398 2018-11-25)

I am trying to use the crate resvg which in turn relies on svgdom. The compiler fails to finish building svgdom (v0.13) with the following error:

error[E0603]: struct `ParseOptions` is private
  --> /Users/drbawb/.cargo/registry/src/github.com-1ecc6299db9ec823/svgdom-0.13.0/src/lib.rs:88:17
   |
88 | pub use parser::ParseOptions;
   |                 ^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0603`.
error: Could not compile `svgdom`.
warning: build failed, waiting for other jobs to finish...
error: build failed

The struct definition which is being re-exported is indeed marked public, and has been since the initial commit of svgdom. However in parser/mod.rs there is a public re-export of this type via glob which later seems to be shadowed by a private import.

I'm reporting this since this crate compiles without error on my copy of the stable release train: rustc 1.30.1 (1433507eb 2018-11-07). I've created a minimal reproduction of the issue on the playground.

Please let me know if I can provide any further details.

@estebank estebank added A-visibility Area: Visibility / privacy regression-from-stable-to-beta Performance or correctness regression from stable to beta. labels Nov 29, 2018
@drbawb
Copy link
Author

drbawb commented Dec 4, 2018

Just FYI I'm still seeing this on the 1.31 pre-release, both with and without the edition = "2018" key in Cargo.toml (rustc 1.31.0 (bdb3f532d 2018-12-03))

@pietroalbini
Copy link
Member

This is a known regression, and it's a "wont' fix". See #56317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-visibility Area: Visibility / privacy regression-from-stable-to-beta Performance or correctness regression from stable to beta.
Projects
None yet
Development

No branches or pull requests

3 participants