提交 85ec0918 编写于 作者: E est31

Make rustdoc aware of the primitive i128 type

Many thanks to ollie27 for spotting all the places.
上级 9e992138
......@@ -268,11 +268,13 @@ pub fn build_impls(cx: &DocContext, did: DefId) -> Vec<clean::Item> {
tcx.lang_items.i16_impl(),
tcx.lang_items.i32_impl(),
tcx.lang_items.i64_impl(),
tcx.lang_items.i128_impl(),
tcx.lang_items.usize_impl(),
tcx.lang_items.u8_impl(),
tcx.lang_items.u16_impl(),
tcx.lang_items.u32_impl(),
tcx.lang_items.u64_impl(),
tcx.lang_items.u128_impl(),
tcx.lang_items.f32_impl(),
tcx.lang_items.f64_impl(),
tcx.lang_items.char_impl(),
......
......@@ -1595,11 +1595,13 @@ fn from_str(s: &str) -> Option<PrimitiveType> {
"i16" => Some(PrimitiveType::I16),
"i32" => Some(PrimitiveType::I32),
"i64" => Some(PrimitiveType::I64),
"i128" => Some(PrimitiveType::I128),
"usize" => Some(PrimitiveType::Usize),
"u8" => Some(PrimitiveType::U8),
"u16" => Some(PrimitiveType::U16),
"u32" => Some(PrimitiveType::U32),
"u64" => Some(PrimitiveType::U64),
"u128" => Some(PrimitiveType::U128),
"bool" => Some(PrimitiveType::Bool),
"char" => Some(PrimitiveType::Char),
"str" => Some(PrimitiveType::Str),
......
......@@ -597,6 +597,17 @@ mod prim_i32 { }
///
mod prim_i64 { }
#[doc(primitive = "i128")]
//
/// The 128-bit signed integer type.
///
/// *[See also the `std::i128` module](i128/index.html).*
///
/// However, please note that examples are shared between primitive integer
/// types. So it's normal if you see usage of types like `i8` in there.
///
mod prim_i128 { }
#[doc(primitive = "u8")]
//
/// The 8-bit unsigned integer type.
......@@ -641,6 +652,17 @@ mod prim_u32 { }
///
mod prim_u64 { }
#[doc(primitive = "u128")]
//
/// The 128-bit unsigned integer type.
///
/// *[See also the `std::u128` module](u128/index.html).*
///
/// However, please note that examples are shared between primitive integer
/// types. So it's normal if you see usage of types like `u8` in there.
///
mod prim_u128 { }
#[doc(primitive = "isize")]
//
/// The pointer-sized signed integer type.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册