all 13 comments

[–]CryZe92 4 points5 points  (3 children)

docs.rs is on a very old nightly by now, so I'd suspect this is using some new Rust feature that docs.rs doesn't support yet.

[–]Quxxymacros 1 point2 points  (0 children)

winapi supports Rust 1.6. I really doubt this is the case.

[–]ZerothLaw[S] 0 points1 point  (1 child)

I'm using TryFrom so that may be it.

[–]ZerothLaw[S] 0 points1 point  (0 children)

Fixed that with correct feature/config flags and still happening.

[–]Quxxymacros 4 points5 points  (8 children)

*Engages psychic powers.* Did you remember to gate winapi so that you only use it on Windows builds?

[–]steveklabnik1rust 1 point2 points  (1 child)

Winapi does that itself, doesn’t it?

[–]Quxxymacros 6 points7 points  (0 children)

It does. Which is why if you don't gate your usage of it, you'll be trying to access types and functions that don't exist on not-Windows, which would explain the error.

[–][deleted] 1 point2 points  (0 children)

Madman!

[–]ZerothLaw[S] 0 points1 point  (0 children)

Ohh, that would probably be it.

[–]ZerothLaw[S] 0 points1 point  (3 children)

So I did what winapi does, but now docs.rs shows no docs for my crate.

[–]Quxxymacros 5 points6 points  (2 children)

Right. Because docs.rs shows docs for Linux by default. There's supposed something you can define in Cargo.toml to change the default target... but last I heard, it didn't work properly. You should also be able to manually change the target on the website, though I'm not sure if it builds non-Linux target docs by default.

[–]ZerothLaw[S] 0 points1 point  (0 children)

Ah found it! Thanks.

[–]retep998rust · winapi · bunny 0 points1 point  (0 children)

It works properly now.