rustdoc: Removed Foreign{Function,Static} item types.
They are just (unsafe) functions and static items to most users and even compilers! The metadata doesn't distinguish them, so Rustdoc ended up producing broken links (generated `ffi.*.html`, links to `fn.*.html`). It would be best to avoid this pitfall at all.
This commit is contained in:
parent
a3bb8585e8
commit
1cb1f00d40
3 changed files with 9 additions and 16 deletions
|
@ -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 @@ impl 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 @@ impl ItemType {
|
|||
ItemType::Method => "method",
|
||||
ItemType::StructField => "structfield",
|
||||
ItemType::Variant => "variant",
|
||||
ItemType::ForeignFunction => "ffi",
|
||||
ItemType::ForeignStatic => "ffs",
|
||||
ItemType::Macro => "macro",
|
||||
ItemType::Primitive => "primitive",
|
||||
ItemType::AssociatedType => "associatedtype",
|
||||
|
|
|
@ -1495,12 +1495,10 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
|
|||
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 item_module(w: &mut fmt::Formatter, cx: &Context,
|
|||
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"),
|
||||
|
|
|
@ -566,8 +566,8 @@
|
|||
"method",
|
||||
"structfield",
|
||||
"variant",
|
||||
"ffi",
|
||||
"ffs",
|
||||
"ffi", // retained for backward compatibility
|
||||
"ffs", // retained for backward compatibility
|
||||
"macro",
|
||||
"primitive",
|
||||
"associatedtype",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue