diagnostic codes / Tiers
E0302 tier-not-declared
The file never declared a tier.
E0302tier-not-declaredadd a top-of-file use tier <name>; statement
| severity | error |
|---|---|
| band | Tiers |
| in the v0 bootstrap | reserved — not emitted yet |
| explain | ralt explain E0302 |
Every file is meant to say which tier it targets, with `use tier <name>;` near the top. A file with no declaration has no ceiling, which defeats the point of having tiers at all.
Not emitted by the v0 bootstrap
Not emitted in v0. A file with no `use tier` line checks clean and builds; `use tier bogus;` is also accepted without complaint. Both are waiting on the same pass as E0301.
What it looks like
e0302.tp
fn main() -> i32 { return 0; }
ralt check e0302.tp echo $? 0
What to do
- Add `use tier core;` as the first line (or `kernel`, `std`, `full`).
- There is no implicit default tier today; once the pass lands, a missing declaration is this code rather than a guess.
Why the code exists
A default tier is a silent choice made on the author's behalf. The declaration is one line and it is the only place the budget is written down.
What ralt explain says
ralt explain E0302 E0302 severity: error name: tier-not-declared hint: add a top-of-file use tier <name>; statement
Related
- Tiers /docs/language/tiers