Skip to content

rand-core: Cargo doc warning with version 0.4.0 #737

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
prataprc opened this issue Feb 21, 2019 · 4 comments
Closed

rand-core: Cargo doc warning with version 0.4.0 #737

prataprc opened this issue Feb 21, 2019 · 4 comments
Labels
C-docs Documentation P-postpone Waiting on something else

Comments

@prataprc
Copy link

I am seeing these warnings while issuing as cargo doc command.

warning: `[impls::next_u32_via_fill]` cannot be resolved, ignoring it...                          
   --> /home/prataprc/.cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.4.0/src/lib.rs:144:24
    |                                                                                             
144 |     /// [`fill_bytes`][impls::next_u32_via_fill].                                         
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^ cannot be resolved, ignoring                     
    |                                                                                     
    = note: #[warn(intra_doc_link_resolution_failure)] on by default                              
    = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]` 

warning: `[distributions::uniform::Uniform]` cannot be resolved, ignoring it...          
   --> /home/prataprc/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.6.5/src/lib.rs:241:22
    |                                                                                   
241 |     /// [`Uniform`]: distributions::uniform::Uniform                                             
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot be resolved, ignoring
    |                                                                                                  
    = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
@dhardy
Copy link
Member

dhardy commented Feb 21, 2019

Yes, we see them too, but testing shows the links work. Maybe you should tell the rustdoc team instead.

@QuietMisdreavus
Copy link

There's an open PR on rustdoc right now to fix some of the spurious warnings, but it's worth noting that some of the ones when documenting rand are not spurious - i've left a couple examples in rust-lang/rust#58745 (comment)

@dhardy
Copy link
Member

dhardy commented Mar 7, 2019

Thanks for looking into this. As you found, the warnings are not all spurious. It turns out that running cargo doc for just rand_core does not generate any warnings, yet running it for the whole of rand does.

I guess then we should re-open this, though from our side I don't think there is anything we can do (other than dramatically simplifying cross-crate documentation, which is not currently well supported).

@dhardy dhardy reopened this Mar 7, 2019
@dhardy dhardy added C-docs Documentation P-postpone Waiting on something else labels Mar 7, 2019
@dhardy
Copy link
Member

dhardy commented Sep 16, 2019

Hmm, these warnings don't show up any more. #849 tracks broken links, which seems to be a manifestation of this.

Note that cargo doc does warn about rngs::SmallRng being unresolved; run with --all-features to fix this (as our CI does).

@dhardy dhardy closed this as completed Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-docs Documentation P-postpone Waiting on something else
Projects
None yet
Development

No branches or pull requests

3 participants