Uh oh!
There was an error while loading. Please reload this page.
Display elided lifetime for non-reference type in doc - #75237
Conversation
rust-highfive
commented
Aug 6, 2020
r? @ollie27 (rust_highfive has picked a reviewer for you, use r? to override) |
jyn514
commented
Aug 7, 2020
#73964 only changed the defaults, so if you used --stage 1 or --stage 2 it should have picked up the changes. That's weird they're not showing up ... Did you try |
jyn514
left a comment
There was a problem hiding this comment.
The changes themselves look great :)
nbdd0121
commented
Aug 7, 2020
That doesn't work either. I am totally confused now. |
nbdd0121
commented
Aug 7, 2020
Okay, it seems that I misunderstood the issue. It seems that the actual issue that imported docs still follow the old style, while items defined within the module follow the new style. So this PR works for |
Try modifying this too: rust/src/librustdoc/clean/utils.rs Line 124 in 743f932 |
nbdd0121
commented
Aug 7, 2020
Just discovered this myself 😂. Thanks anyway. |
jyn514
commented
Aug 7, 2020
Can you also add a test case for this on cross-crate item? |
nbdd0121
commented
Aug 7, 2020
test5 and test6 are cross-crate. |
jyn514
commented
Aug 7, 2020
Oh I see, it doesn't have to do with re-exports, only with the original crate of the item. @bors r+ |
bors
commented
Aug 7, 2020
📌 Commit 505d157 has been approved by |
nbdd0121
commented
Aug 7, 2020
Oh sorry, it seems that it doesn't catch the case. Let me add a proper test for the re-export scenario. |
jyn514
commented
Aug 7, 2020
@bors r- |
jyn514
commented
Aug 8, 2020
Yeah, that looks like about the test case I expected. @bors r+ |
bors
commented
Aug 8, 2020
📌 Commit 541fbbb has been approved by |
Rollup of 7 pull requests Successful merges: - rust-lang#75224 (Don't call a function in function-arguments-naked.rs) - rust-lang#75237 (Display elided lifetime for non-reference type in doc) - rust-lang#75250 (make MaybeUninit::as_(mut_)ptr const) - rust-lang#75253 (clean up const-hacks in int endianess conversion functions) - rust-lang#75259 (Add missing backtick) - rust-lang#75267 (Small cleanup) - rust-lang#75270 (fix a couple of clippy findings) Failed merges: r? @ghost
In edition 2018 we encourage writing
<'_>explicitly, so rustdoc should display like such as well.Fixes#75225
Somehow when I run the compiled rustdoc usingcargo +stage2 docon other crates, it correctly produces<'_>, but I couldn't get the std doc to do the same with./x.py doc --stage 2. Might this be related to the recent change to x.py about how the doc is built?