Skip to main content

type_doc

Function type_doc 

Source
pub fn type_doc(name: &str) -> Option<&'static str>
Expand description

The description of the built-in type name denotes, or None for any other name.

Type position is a different question from value position and gets a different answer: Int is a type and never a value, Range is a type whose name no value shares, and the nine collection names are both — so this looks in BUILTIN_TYPES first and falls back to PRELUDE, where Vec’s row already opens with what a Vec is before it says what Vec() builds.

The fallback is what keeps Vec[Int] from needing a second description of a Vec that could drift from the first.