rustdoc: Support for "array" primitive
Impls on `clean::Type::FixedVector` are now collected in the array primitive page instead of the slice primitive page. Also add a primitive docs for arrays to `std`.
This commit is contained in:
parent
b0aad7dd4f
commit
2df8830642
6 changed files with 38 additions and 10 deletions
|
|
@ -1322,7 +1322,8 @@ pub enum Type {
|
|||
/// For parameterized types, so the consumer of the JSON don't go
|
||||
/// looking for types which don't exist anywhere.
|
||||
Generic(String),
|
||||
/// Primitives are just the fixed-size numeric types (plus int/uint/float), and char.
|
||||
/// Primitives are the fixed-size numeric types (plus int/uint/float), char,
|
||||
/// arrays, slices, and tuples.
|
||||
Primitive(PrimitiveType),
|
||||
/// extern "ABI" fn
|
||||
BareFunction(Box<BareFunctionDecl>),
|
||||
|
|
@ -1362,6 +1363,7 @@ pub enum PrimitiveType {
|
|||
Bool,
|
||||
Str,
|
||||
Slice,
|
||||
Array,
|
||||
PrimitiveTuple,
|
||||
}
|
||||
|
||||
|
|
@ -1396,6 +1398,7 @@ impl PrimitiveType {
|
|||
"str" => Some(Str),
|
||||
"f32" => Some(F32),
|
||||
"f64" => Some(F64),
|
||||
"array" => Some(Array),
|
||||
"slice" => Some(Slice),
|
||||
"tuple" => Some(PrimitiveTuple),
|
||||
_ => None,
|
||||
|
|
@ -1440,6 +1443,7 @@ impl PrimitiveType {
|
|||
Str => "str",
|
||||
Bool => "bool",
|
||||
Char => "char",
|
||||
Array => "array",
|
||||
Slice => "slice",
|
||||
PrimitiveTuple => "tuple",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue