-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add f16
and f128
to rustdoc's PrimitiveType
#123581
Conversation
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid |
@rustbot label +F-f16_and_f128 |
How fitting :P Jokes aside, does this fix the issues you were seeing? |
I don't exactly know anymore how far along |
I thought the same :D
Yes it did, the changes from #122470 show up now.
Are there any tests for the other float types that I could use as a reference? I am not seeing anything but might not be looking in the right place. |
HIt ctrl+enter at the wrong time, whoops. Anyway #122470 does not pass CI currently (broken links error) but with this patch applied it does. Is that sufficient for a test or did you mean something else? |
I thought of something like #![deny(rustdoc::broken_intra_doc_links)]
#![features(f16, f128)]
//! [`f16`]. [`f128`].
// @has f16_f128/index.html
// @has - '//a/@href' '{{channel}}/std/primitive.f16.html'
// @has - '//a/@href' '{{channel}}/std/primitive.f128.html' If I'm not mistaken, this test currently fails on master. I know that this test is probably not super important but we can always remove it, extend it or do whatever. |
Ah, but notriddle's suggestion might be better since the necessary |
Fix a few places where these primitives were missing from librustdoc.
cc049f6
to
ebc86e6
Compare
I added notriddle's test and verified it fails on master, but passes with this change. Would you still want the intra-doc link test? If so, I can add that after #122470 lands. Is there a good place to throw an error if |
Yes, we should definitely do that to improve the contributor UX. We have a FIXME here: rust/src/librustdoc/clean/types.rs Lines 266 to 272 in 5dbaafd
I haven't checked if it would make sense to add a check in this specific location but feel free to experiment and/or look for other places mentioning |
@bors r+ rollup |
…iaskrgr Rollup of 4 pull requests Successful merges: - rust-lang#123410 (Relax framework linking test) - rust-lang#123446 (Fix incorrect 'llvm_target' value used on watchOS target) - rust-lang#123579 (add some more tests) - rust-lang#123581 (Add `f16` and `f128` to rustdoc's `PrimitiveType`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#123581 - tgross35:f16-f128-rustdoc-updates, r=fmease Add `f16` and `f128` to rustdoc's `PrimitiveType` Fix a few places where these primitives were missing from librustdoc. This should fix the CI failures from doc links in rust-lang#122470.
Fix a few places where these primitives were missing from librustdoc. This should fix the CI failures from doc links in #122470.