-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Display elided lifetime for non-reference type in doc #75237
Conversation
r? @ollie27 (rust_highfive has picked a reviewer for you, use r? to override) |
#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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes themselves look great :)
That doesn't work either. I am totally confused now. |
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
|
Just discovered this myself 😂. Thanks anyway. |
Can you also add a test case for this on cross-crate item? |
test5 and test6 are cross-crate. |
Oh I see, it doesn't have to do with re-exports, only with the original crate of the item. @bors r+ |
📌 Commit 505d157 has been approved by |
Oh sorry, it seems that it doesn't catch the case. Let me add a proper test for the re-export scenario. |
@bors r- |
Yeah, that looks like about the test case I expected. @bors r+ |
📌 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 doc
on 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?