diff --git a/src/librustdoc/html/item_type.rs b/src/librustdoc/html/item_type.rs index 1917184c5a9904beda0fba80d4f3456412068df6..0ad12b957ba8f868793ae5261a5078035325ce2f 100644 --- a/src/librustdoc/html/item_type.rs +++ b/src/librustdoc/html/item_type.rs @@ -34,8 +34,7 @@ pub enum ItemType { Method = 10, StructField = 11, Variant = 12, - ForeignFunction = 13, - ForeignStatic = 14, + // we used to have ForeignFunction and ForeignStatic. they are retired now. Macro = 15, Primitive = 16, AssociatedType = 17, @@ -59,8 +58,8 @@ pub fn from_item(item: &clean::Item) -> ItemType { clean::MethodItem(..) => ItemType::Method, clean::StructFieldItem(..) => ItemType::StructField, clean::VariantItem(..) => ItemType::Variant, - clean::ForeignFunctionItem(..) => ItemType::ForeignFunction, - clean::ForeignStaticItem(..) => ItemType::ForeignStatic, + clean::ForeignFunctionItem(..) => ItemType::Function, // no ForeignFunction + clean::ForeignStaticItem(..) => ItemType::Static, // no ForeignStatic clean::MacroItem(..) => ItemType::Macro, clean::PrimitiveItem(..) => ItemType::Primitive, clean::AssociatedTypeItem(..) => ItemType::AssociatedType, @@ -95,8 +94,6 @@ pub fn to_static_str(&self) -> &'static str { ItemType::Method => "method", ItemType::StructField => "structfield", ItemType::Variant => "variant", - ItemType::ForeignFunction => "ffi", - ItemType::ForeignStatic => "ffs", ItemType::Macro => "macro", ItemType::Primitive => "primitive", ItemType::AssociatedType => "associatedtype", diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 8c2be47d9c0f4b748050359e906a9c16f87c21fa..36ce2796faf0de859d1e094a28716e59296f2362 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -1495,12 +1495,10 @@ fn reorder(ty: ItemType) -> u8 { ItemType::Enum => 5, ItemType::Constant => 6, ItemType::Static => 7, - ItemType::ForeignFunction => 8, - ItemType::ForeignStatic => 9, - ItemType::Trait => 10, - ItemType::Function => 11, - ItemType::Typedef => 12, - _ => 13 + ty as u8, + ItemType::Trait => 8, + ItemType::Function => 9, + ItemType::Typedef => 10, + _ => 11 + ty as u8, } } @@ -1559,8 +1557,6 @@ fn cmp(i1: &clean::Item, i2: &clean::Item, idx1: uint, idx2: uint) -> Ordering { ItemType::Method => ("methods", "Methods"), ItemType::StructField => ("fields", "Struct Fields"), ItemType::Variant => ("variants", "Variants"), - ItemType::ForeignFunction => ("ffi-fns", "Foreign Functions"), - ItemType::ForeignStatic => ("ffi-statics", "Foreign Statics"), ItemType::Macro => ("macros", "Macros"), ItemType::Primitive => ("primitives", "Primitive Types"), ItemType::AssociatedType => ("associated-types", "Associated Types"), diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js index 7c6f7ed3fe23014151ad32712b00f4ed4495382e..0fc6677cd9f719d735b5f6568195a1a2603c9c54 100644 --- a/src/librustdoc/html/static/main.js +++ b/src/librustdoc/html/static/main.js @@ -566,8 +566,8 @@ "method", "structfield", "variant", - "ffi", - "ffs", + "ffi", // retained for backward compatibility + "ffs", // retained for backward compatibility "macro", "primitive", "associatedtype",