Skip to content

Commit 016a0d4

Browse files
committed
Make rustdoc aware of the primitive i128 type
Many thanks to ollie27 for spotting all the places.
1 parent 0730f83 commit 016a0d4

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

src/librustdoc/clean/inline.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,13 @@ pub fn build_impls(cx: &DocContext, did: DefId) -> Vec<clean::Item> {
269269
tcx.lang_items.i16_impl(),
270270
tcx.lang_items.i32_impl(),
271271
tcx.lang_items.i64_impl(),
272+
tcx.lang_items.i128_impl(),
272273
tcx.lang_items.usize_impl(),
273274
tcx.lang_items.u8_impl(),
274275
tcx.lang_items.u16_impl(),
275276
tcx.lang_items.u32_impl(),
276277
tcx.lang_items.u64_impl(),
278+
tcx.lang_items.u128_impl(),
277279
tcx.lang_items.f32_impl(),
278280
tcx.lang_items.f64_impl(),
279281
tcx.lang_items.char_impl(),

src/librustdoc/clean/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,11 +1587,13 @@ impl PrimitiveType {
15871587
"i16" => Some(PrimitiveType::I16),
15881588
"i32" => Some(PrimitiveType::I32),
15891589
"i64" => Some(PrimitiveType::I64),
1590+
"i128" => Some(PrimitiveType::I128),
15901591
"usize" => Some(PrimitiveType::Usize),
15911592
"u8" => Some(PrimitiveType::U8),
15921593
"u16" => Some(PrimitiveType::U16),
15931594
"u32" => Some(PrimitiveType::U32),
15941595
"u64" => Some(PrimitiveType::U64),
1596+
"u128" => Some(PrimitiveType::U128),
15951597
"bool" => Some(PrimitiveType::Bool),
15961598
"char" => Some(PrimitiveType::Char),
15971599
"str" => Some(PrimitiveType::Str),

src/libstd/primitive_docs.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,17 @@ mod prim_i32 { }
597597
///
598598
mod prim_i64 { }
599599

600+
#[doc(primitive = "i128")]
601+
//
602+
/// The 128-bit signed integer type.
603+
///
604+
/// *[See also the `std::i128` module](i128/index.html).*
605+
///
606+
/// However, please note that examples are shared between primitive integer
607+
/// types. So it's normal if you see usage of types like `i8` in there.
608+
///
609+
mod prim_i128 { }
610+
600611
#[doc(primitive = "u8")]
601612
//
602613
/// The 8-bit unsigned integer type.
@@ -641,6 +652,17 @@ mod prim_u32 { }
641652
///
642653
mod prim_u64 { }
643654

655+
#[doc(primitive = "u128")]
656+
//
657+
/// The 128-bit unsigned integer type.
658+
///
659+
/// *[See also the `std::u128` module](u128/index.html).*
660+
///
661+
/// However, please note that examples are shared between primitive integer
662+
/// types. So it's normal if you see usage of types like `u8` in there.
663+
///
664+
mod prim_u128 { }
665+
644666
#[doc(primitive = "isize")]
645667
//
646668
/// The pointer-sized signed integer type.

0 commit comments

Comments
 (0)