Stream: rustdoc

Topic: intra doc links and macros


view this post on Zulip Joshua Nelson (Dec 30 2020 at 01:39):

@Jacob Pratt about https://github.com/rust-lang/rust/issues/72243#issuecomment-719122429 - I tried checking out https://github.com/time-rs/time/blob/3d07c20eb94670981a9fe7435bd0b2339cccdc96/src/lib.rs#L282-L297 to see the error, but git tells me the commit doesn't exist:

$ git checkout 3d07c20eb94670981a9fe7435bd0b2339cccdc96
fatal: reference is not a tree: 3d07c20eb94670981a9fe7435bd0b2339cccdc96

and then I tried a commit with the same name (https://github.com/time-rs/time/blob/5fa1ab1047b74ecb15b108d277ec7aedf7de83e6/src/lib.rs#L282-L297) but that didn't give any errors

view this post on Zulip Joshua Nelson (Dec 30 2020 at 01:40):

(yes, I'm just now getting back to that two months later)

view this post on Zulip Joshua Nelson (Dec 30 2020 at 01:41):

I'd expect this to be related to https://github.com/rust-lang/rust/issues/74355 somehow, though

view this post on Zulip Joshua Nelson (Dec 30 2020 at 01:41):

there's a lot of bugs around macros currently

view this post on Zulip Jacob Pratt (Dec 30 2020 at 01:52):

Unless the behavior has changed in the meantime, the current head commit on main will likely still have this.

view this post on Zulip Joshua Nelson (Dec 30 2020 at 01:53):

oh I need to pass --cfg __time_03_docs I think

view this post on Zulip Joshua Nelson (Dec 30 2020 at 01:53):

nope, still no errors

view this post on Zulip Joshua Nelson (Dec 30 2020 at 01:56):

@Jacob Pratt what do you mean by 'have this'?

view this post on Zulip Jacob Pratt (Dec 30 2020 at 01:56):

I don't think it actually errored, just silently didn't work. I'd have to check when I'm back on my laptop, though.

view this post on Zulip Joshua Nelson (Dec 30 2020 at 01:57):

hmm, ok, I'll take a look at the docs

view this post on Zulip Joshua Nelson (Dec 30 2020 at 01:57):

rename time-macros/{src => }/lib.rs (54%)

ayy someone else who thinks src/ in nested crates is dumb :laughing:

view this post on Zulip Jacob Pratt (Dec 30 2020 at 01:58):

One file wasn't worth it in my editor lol

view this post on Zulip Joshua Nelson (Dec 30 2020 at 01:58):

exactly :laughing:

view this post on Zulip Jacob Pratt (Dec 30 2020 at 02:00):

The docs for main are published at time-rs.github.io, by the way.

view this post on Zulip Joshua Nelson (Dec 30 2020 at 02:01):

@Jacob Pratt ok I found the issue, it links as crate::PrimitiveDateTime on stable and time/struct.PrimitiveDateTime.html on nightly

view this post on Zulip Joshua Nelson (Dec 30 2020 at 02:01):

so this was https://github.com/rust-lang/rust/pull/77253 and not related to macros at all

view this post on Zulip Jacob Pratt (Dec 30 2020 at 02:02):

Guess you were on top of it the whole time!

view this post on Zulip Jacob Pratt (Dec 30 2020 at 02:02):

It's been long enough that I don't even really remember what the bug was haha

view this post on Zulip Joshua Nelson (Dec 30 2020 at 02:03):

yeah I really wish rustdoc would report these as errors instead of swallowing it https://github.com/rust-lang/rust/issues/77200

view this post on Zulip Joshua Nelson (Dec 30 2020 at 02:04):

but Manish Goregaokar and others thought that getting warnings from your dependencies you can't fix is bad

view this post on Zulip Jacob Pratt (Dec 30 2020 at 02:04):

Actually reading my previous comment, that no wholly longer applies as I removed the prelude.

view this post on Zulip Jacob Pratt (Dec 30 2020 at 02:04):

But that might be misunderstanding what I said before

view this post on Zulip Joshua Nelson (Dec 30 2020 at 02:05):

tbh since you don't remember what the issue was and this works on nightly I'm inclined to let it go :P

view this post on Zulip Jacob Pratt (Dec 30 2020 at 02:05):

Works for me :shrug:‍♂️

view this post on Zulip Joshua Nelson (Dec 30 2020 at 02:06):

apparently zulip doesn't understand how emojis work lol image.png

view this post on Zulip Jacob Pratt (Dec 30 2020 at 02:07):

Same on mobile


Last updated: Oct 11 2021 at 22:34 UTC