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
{{ message }}
Repository navigation
Source is missing from docs for crates that use a procedural macro #43371
Running ./mach doc on Servo's codebase yields a bunch of crates with the following warning:
warning: source code was requested to be rendered, but processing `<proc-macro source code>` had an error: No such file or directory (os error 2)
skipping rendering of source code
I believe the issue is that (since #40939) we no longer accurately track expansion info for names declared in a macro. That means that tools think some names are hand-written, when they are macro generated (this is also causing problems for the RLS). #43179 was meant to fix this, but it did not (at least not for all cases). I haven't looked into the details.
This might get fixed by #43230, although perhaps not (the example here is a 1.1 custom derive, but looking at 43230 I'm not sure if the filename makes sense, so I'm not convinced I know what it going on 100%)
Activity
jdm commentedon Jul 20, 2017
Minimal reproduction:
If I remove the
puborHeapSizeOfderivation then it works fine.jdm commentedon Jul 20, 2017
If I use
cargo +beta doc --openthen it works fine;cargo +nightly doc --openis broken.jdm commentedon Jul 20, 2017
jdm commentedon Jul 20, 2017
The 7/6 nightly (3610a70) works fine, and the 7/7 nightly (696412d) is broken.
jdm commentedon Jul 20, 2017
My money is on #40939.
alexcrichton commentedon Jul 23, 2017
cc @jseyfried, @nrc
nrc commentedon Jul 25, 2017
I believe the issue is that (since #40939) we no longer accurately track expansion info for names declared in a macro. That means that tools think some names are hand-written, when they are macro generated (this is also causing problems for the RLS). #43179 was meant to fix this, but it did not (at least not for all cases). I haven't looked into the details.
oli-obk commentedon Jul 25, 2017
Not just names. Clippy gets confused by the
trueorfalseinside the expansion ofcfg!: #43268Mark-Simulacrum commentedon Jul 27, 2017
Nominating; needs investigation and a fix.
nrc commentedon Jul 28, 2017
This might get fixed by #43230, although perhaps not (the example here is a 1.1 custom derive, but looking at 43230 I'm not sure if the filename makes sense, so I'm not convinced I know what it going on 100%)
nrc commentedon Jul 28, 2017
I can't reproduce the bug in the reduced example with today's nightly (perhaps it was fixed by #43179). @jdm can you still repro?
nrc commentedon Jul 28, 2017
And the link to https://doc.servo.org/script/script_thread/struct.ScriptThread.html works. So I think this is fixed. @jdm please re-open if not.
Aceeri commentedon Sep 9, 2017
I'm receiving this error when trying to run rustdoc here: https://travis-ci.org/amethyst/website#L935
I'm unable to reproduce locally, but others on macos/linux have been able to. Unsure if this is related to this or not however.