-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Incorrect mixing of reexport and definition documentation of proc macros #64251
Comments
Oh, and also, running
Not sure if this warning is expected there. And not sure if related to this bug. |
This is a consequence of the fact that rust-lang/cargo#7159 has not yet been merged. Once it gets merged, and rust updates its Cargo submodule, this issue should go away. |
@LukasKalbertodt: It turns out that this issue was unrelated. I've opened a PR to fix it. |
@Aaron1011 I see. Thanks for your work on this :) |
…excrichton Load proc macro metadata in the correct order. Serialized proc macro metadata is assumed to have a one-to-one correspondence with the entries in static array generated by proc_macro_harness. However, we were previously serializing proc macro metadata in a different order than proc macros were laied out in the static array. This lead to us associating the wrong data with a proc macro when generating documentation, causing Rustdoc to generate incorrect docs for proc macros. This commit keeps track of the order in which we insert proc macros into the generated static array. We use this same order when serializing proc macro metadata, ensuring that we can later associate the metadata for a proc macro with its entry in the static array. Fixes rust-lang#64251
…excrichton Load proc macro metadata in the correct order. Serialized proc macro metadata is assumed to have a one-to-one correspondence with the entries in static array generated by proc_macro_harness. However, we were previously serializing proc macro metadata in a different order than proc macros were laied out in the static array. This lead to us associating the wrong data with a proc macro when generating documentation, causing Rustdoc to generate incorrect docs for proc macros. This commit keeps track of the order in which we insert proc macros into the generated static array. We use this same order when serializing proc macro metadata, ensuring that we can later associate the metadata for a proc macro with its entry in the static array. Fixes rust-lang#64251
…excrichton Load proc macro metadata in the correct order. Serialized proc macro metadata is assumed to have a one-to-one correspondence with the entries in static array generated by proc_macro_harness. However, we were previously serializing proc macro metadata in a different order than proc macros were laied out in the static array. This lead to us associating the wrong data with a proc macro when generating documentation, causing Rustdoc to generate incorrect docs for proc macros. This commit keeps track of the order in which we insert proc macros into the generated static array. We use this same order when serializing proc macro metadata, ensuring that we can later associate the metadata for a proc macro with its entry in the static array. Fixes rust-lang#64251
The PR #62855 improved the situation about documenting proc macros. Thanks for that! However, I noticed a bug with it. I'm using
rustc 1.39.0-nightly (6e19f3f38 2019-09-06)
.Cargo.toml
src/lib.rs
macros/Cargo.toml
macros/src/lib.rs
Running
cargo doc
results in this:Looks like a simple typo or off-by-one or something like that bug. When using only
proc_macro
and notproc_macro_derive
s, everything looks good to me.CC @Aaron1011
The text was updated successfully, but these errors were encountered: