error unknown-type
What it means#
A type name in an annotation, signature or generic argument does not refer to a primitive, a declared type (data, enum, interface, alias, ...) or an imported type (§3.1, §3.4). Typos and missing imports are the usual causes.
Example#
fn main() {
let name: Strng = "Ann" // <- unknown-type
}error
unknown-type
How to fix#
fn main() {
let name: str = "Ann"
}Fix the spelling or add the use that brings the type into scope.