From ebc86e6f5846c4e8995e20416dd25cd1bf137b7e Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Sat, 6 Apr 2024 22:38:20 -0400 Subject: Add `f16` and `f128` to rustdoc's `PrimitiveType` Fix a few places where these primitives were missing from librustdoc. --- tests/rustdoc/primitive/primitive.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests/rustdoc') diff --git a/tests/rustdoc/primitive/primitive.rs b/tests/rustdoc/primitive/primitive.rs index 32af2636c18..4b89fd9dfb7 100644 --- a/tests/rustdoc/primitive/primitive.rs +++ b/tests/rustdoc/primitive/primitive.rs @@ -1,6 +1,8 @@ #![crate_name = "foo"] #![feature(rustc_attrs)] +#![feature(f16)] +#![feature(f128)] // @has foo/index.html '//h2[@id="primitives"]' 'Primitive Types' // @has foo/index.html '//a[@href="primitive.i32.html"]' 'i32' @@ -13,9 +15,19 @@ // @!has foo/index.html '//span' '🔒' #[rustc_doc_primitive = "i32"] /// this is a test! -mod i32{} +mod i32 {} // @has foo/primitive.bool.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'hello' #[rustc_doc_primitive = "bool"] /// hello mod bool {} + +// @has foo/primitive.f16.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'hello' +#[rustc_doc_primitive = "f16"] +/// hello +mod f16 {} + +// @has foo/primitive.f128.html '//section[@id="main-content"]//div[@class="docblock"]//p' 'hello' +#[rustc_doc_primitive = "f128"] +/// hello +mod f128 {} -- cgit 1.4.1-3-g733a5