1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Go's universe block: the names every package sees without importing them.
//!
//! A universe name is defined outside any package, so a snapshot of one
//! repository never holds its definition. Naming the block explicitly is what
//! separates "declared somewhere this corpus does not reach" from "declared
//! nowhere": `len` is the first, a misspelt call is the second, and a report
//! that called both missing would say nothing useful about either.
/// Whether one name is declared in the universe block.
///
/// Every predeclared identifier Go's specification states is written down here
/// rather than queried from a toolchain: the block is part of the language, and
/// reading it from an installed Go would make one repository state resolve two
/// ways.
///
/// A match rather than a sorted table searched: a table's order is a second
/// invariant nothing enforces, and one entry dropped in alphabetically by eye
/// makes a real universe name answer `false` — which turns a lookup miss into a
/// missing definition and drops the canonical package prefix from every
/// signature naming that type. The match is order-free, and the compiler builds
/// the lookup rather than the table's author.
pub