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:
Kang Seonghoon
2014-12-04 00:29:21 +09:00
parent a3bb8585e8
commit 1cb1f00d40
3 changed files with 9 additions and 16 deletions

View File

@@ -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"),