You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cargo doc --open
Compiling semver v1.0.11 (/home/ben/semver)
Documenting semver v1.0.11 (/home/ben/semver)
error[E0308]: mismatched types
--> src/lib.rs:525:29
|
525 | pub const EMPTY: Self = "";
| ^^ expected struct `BuildMetadata`, found `&str`
error[E0308]: mismatched types
--> src/lib.rs:502:29
|
502 | pub const EMPTY: Self = "";
| ^^ expected struct `Prerelease`, found `&str`
For more information about this error, try `rustc --explain E0308`.
Finished dev [unoptimized + debuginfo] target(s) in 0.81s
Opening /home/ben/semver/target/doc/semver/index.html
I see that the lines in question have #[cfg(doc)] in order to work around rust-lang/rust#97933 , and it's true that this doesn't actually prevent the cargo doc from succeeding (somehow???), but it's a bit alarming at first, especially when semver is somewhere deep in your dependency tree and you wonder what horrible thing could have gone wrong that your project seems to cargo build properly but not cargo doc.
The text was updated successfully, but these errors were encountered:
I see that the lines in question have
#[cfg(doc)]
in order to work around rust-lang/rust#97933 , and it's true that this doesn't actually prevent thecargo doc
from succeeding (somehow???), but it's a bit alarming at first, especially when semver is somewhere deep in your dependency tree and you wonder what horrible thing could have gone wrong that your project seems tocargo build
properly but notcargo doc
.The text was updated successfully, but these errors were encountered: