Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.brim-lang.com/llms.txt

Use this file to discover all available pages before exploring further.

Brim diagnostics are stable by code and documented at https://docs.brim-lang.com/diagnostics/<code>. Total documented diagnostics: 210
  • Errors: 185
  • Warnings: 19
  • Bugs: 6
Use docs search for a specific code (E3000, W1000, etc.), or browse by phase below.

Browse by phase

  • General - 16 diagnostics (E7000 to W1013), 0 errors / 10 warnings / 6 bugs
  • Lexer - 15 diagnostics (E1001 to E1015), 15 errors / 0 warnings / 0 bugs
  • Parser - 27 diagnostics (E0000 to E1125), 26 errors / 1 warnings / 0 bugs
  • Name Resolution - 37 diagnostics (E2000 to W1011), 36 errors / 1 warnings / 0 bugs
  • Type Check - 54 diagnostics (E3000 to W1010), 50 errors / 4 warnings / 0 bugs
  • Borrow Check - 22 diagnostics (E4000 to W1015), 21 errors / 1 warnings / 0 bugs
  • Lowering - 11 diagnostics (E5000 to E5010), 10 errors / 1 warnings / 0 bugs
  • Codegen - 12 diagnostics (E6000 to W1014), 11 errors / 1 warnings / 0 bugs
  • Runtime - 16 diagnostics (E8000 to E8015), 16 errors / 0 warnings / 0 bugs

Full index

Need a full flat code list? Expand the phase pages from the sidebar, or jump to any code URL directly.

General

Phase page: /diagnostics/phases/general
  • E7000 - internal compiler error (Bug)
  • E7001 - compiler unreachable witness (Bug)
  • E7002 - optimizer broke SSA invariants (Bug)
  • E7003 - metadata corruption (Bug)
  • E7004 - ICE during macro expansion (Bug)
  • E7005 - ICE during borrow graph solve (Bug)
  • W1000 - unused variable (Warning)
  • W1001 - unused import (Warning)
  • W1002 - dead code (Warning)
  • W1004 - deprecated symbol (Warning)
  • W1005 - unsafe omitted documentation (Warning)
  • W1006 - missing docs on public API (Warning)
  • W1007 - future incompatibility lint (Warning)
  • W1009 - unused mut (Warning)
  • W1012 - unused attribute (Warning)
  • W1013 - macro hygiene leak suspicion (Warning)

Lexer

Phase page: /diagnostics/phases/lexer
  • E1001 - invalid character (Error)
  • E1002 - invalid token sequence (Error)
  • E1003 - unterminated string literal (Error)
  • E1004 - invalid escape sequence (Error)
  • E1005 - invalid numeric literal (Error)
  • E1006 - unterminated block comment (Error)
  • E1007 - unterminated raw string (Error)
  • E1008 - invalid character literal (Error)
  • E1009 - invalid digit for base (Error)
  • E1010 - invalid UTF-8 encoding (Error)
  • E1011 - shebang only allowed at start (Error)
  • E1012 - integer literal overflow (Error)
  • E1013 - float literal overflow (Error)
  • E1014 - indentation mixes tabs and spaces (Error)
  • E1015 - unexpected null byte (Error)

Parser

Phase page: /diagnostics/phases/parser
  • E0000 - empty source file (Warning)
  • E1100 - unexpected token (Error)
  • E1101 - unexpected end of file (Error)
  • E1102 - expected identifier (Error)
  • E1103 - reserved keyword in expression position (Error)
  • E1104 - missing delimiter (Error)
  • E1105 - expected item (Error)
  • E1106 - expected expression (Error)
  • E1107 - expected type (Error)
  • E1108 - expected pattern (Error)
  • E1109 - invalid modifier (Error)
  • E1110 - invalid binding (Error)
  • E1111 - parser recovery limit reached (Error)
  • E1112 - expected comma or separator (Error)
  • E1113 - forbidden trailing token (Error)
  • E1114 - duplicate parameter name (Error)
  • E1115 - duplicate field in record literal (Error)
  • E1116 - generic argument list mismatch (Error)
  • E1117 - await in non-async context (Error)
  • E1118 - invalid visibility qualifier (Error)
  • E1119 - attribute not applicable (Error)
  • E1120 - duplicate attribute (Error)
  • E1121 - unsafe block required (Error)
  • E1122 - macro invocation malformed (Error)
  • E1123 - invalid interpolation in string (Error)
  • E1124 - missing fn body (Error)
  • E1125 - invalid operator fixity (Error)

Name Resolution

Phase page: /diagnostics/phases/name-resolution
  • E2000 - undefined variable (Error)
  • E2001 - undefined type (Error)
  • E2002 - undefined module (Error)
  • E2003 - ambiguous reference (Error)
  • E2004 - duplicate definition (Error)
  • E2005 - private item (Error)
  • E2006 - cyclic module graph (Error)
  • E2007 - unresolved import (Error)
  • E2008 - conflicting imports (Error)
  • E2009 - invalid path root (Error)
  • E2010 - expected value namespace (Error)
  • E2011 - expected type namespace (Error)
  • E2012 - invalid re-export (Error)
  • E2013 - unknown lint or attribute name (Error)
  • E2014 - shadowed definition (Error)
  • E2015 - mutable static misuse (Error)
  • E2016 - cannot capture environment (Error)
  • E2017 - duplicate variant (Error)
  • E2018 - duplicate record field in type (Error)
  • E2019 - trait item missing (Error)
  • E2020 - orphan impl (Error)
  • E2021 - experimental feature (Error)
  • E2022 - reserved for forward compatibility (Error)
  • E2023 - intrinsic misuse at scope (Error)
  • E2024 - foreign ABI mismatch (Error)
  • E2025 - recursive binding (Error)
  • E2026 - constant evaluation dependency cycle (Error)
  • E2027 - associated item not in trait (Error)
  • E2028 - opaque type leak (Error)
  • E2029 - crate mismatch (Error)
  • E2030 - cannot infer closure signature (Error)
  • E2031 - pattern binding collision (Error)
  • E2032 - unsafe fn requirement (Error)
  • E2033 - missing ABI declaration (Error)
  • E2034 - duplicate inherent method (Error)
  • E2035 - glob import ambiguity (Error)
  • W1011 - shadowing unchanged type (Warning)

Type Check

Phase page: /diagnostics/phases/type-check
  • E3000 - type mismatch (Error)
  • E3001 - cannot unify types (Error)
  • E3002 - occurs check failure (Error)
  • E3003 - ambiguous inference (Error)
  • E3004 - unsolved type variables (Error)
  • E3005 - argument arity mismatch (Error)
  • E3006 - generic arity mismatch (Error)
  • E3007 - trait bound not satisfied (Error)
  • E3008 - missing trait implementation (Error)
  • E3009 - associated type projection failure (Error)
  • E3010 - invalid cast (Error)
  • E3011 - match arms incompatible (Error)
  • E3012 - non-exhaustive patterns (Error)
  • E3013 - unreachable pattern (Warning)
  • E3014 - overlapping patterns (Error)
  • E3015 - missing field init (Error)
  • E3016 - unknown field (Error)
  • E3017 - mutability mismatch (Error)
  • E3018 - borrow conflict at type level (Error)
  • E3019 - cannot coerce (Error)
  • E3020 - diverging type misuse (Error)
  • E3021 - async future type mismatch (Error)
  • E3022 - await outside async fn (Error)
  • E3023 - indexing requires Slice trait (Error)
  • E3024 - binary operator unsupported (Error)
  • E3025 - unary operator unsupported (Error)
  • E3026 - method resolution ambiguity (Error)
  • E3027 - Sized bound failure (Error)
  • E3028 - copy semantics violated (Error)
  • E3029 - send/sync boundary (Error)
  • E3030 - const generic mismatch (Error)
  • E3031 - type alias recursion (Error)
  • E3032 - literal type unsupported (Error)
  • E3033 - field privacy at type layer (Error)
  • E3034 - enum payload arity mismatch (Error)
  • E3035 - refutable pattern in binding (Error)
  • E3036 - guard expression not bool (Error)
  • E3037 - range pattern invalid type (Error)
  • E3038 - array length mismatch (Error)
  • E3039 - tuple projection out of range (Error)
  • E3040 - variadic ABI misuse (Error)
  • E3041 - generic constraint cycle (Error)
  • E3042 - implicit Sized not relaxed (Error)
  • E3043 - trait object invalid (Error)
  • E3044 - higher-ranked mismatch (Error)
  • E3045 - effect mismatch (Error)
  • E3046 - panic type in non-throwing context (Error)
  • E3047 - comparison trait missing (Error)
  • E3048 - pointer provenance mismatch (Error)
  • E3049 - alignment requirement violated (Error)
  • E3050 - vtable layout mismatch (Error)
  • W1003 - unreachable pattern warning (Warning)
  • W1008 - overflowing literal (warn) (Warning)
  • W1010 - irrefutable let pattern warning (Warning)

Borrow Check

Phase page: /diagnostics/phases/borrow-check
  • E4000 - use after move (Error)
  • E4001 - borrow of moved value (Error)
  • E4002 - partial move (Error)
  • E4003 - cannot move out of borrowed content (Error)
  • E4004 - multiple mutable borrows (Error)
  • E4005 - mutable borrow while immutable active (Error)
  • E4006 - borrow escapes stack frame (Error)
  • E4007 - borrow of temporary (Error)
  • E4008 - drop order conflict (Error)
  • E4009 - cannot assign through frozen borrow (Error)
  • E4010 - closure capture conflict (Error)
  • E4011 - async borrow across yield (Error)
  • E4012 - iterator invalidation pattern (Error)
  • E4013 - reborrow shortening failure (Error)
  • E4014 - union field borrow unsafe (Error)
  • E4015 - self borrow structural conflict (Error)
  • E4016 - pinned value unpinned borrow (Error)
  • E4017 - ghost borrow via destructor (Error)
  • E4018 - shared XOR mutable invariant (Error)
  • E4019 - thread boundary borrow (Error)
  • E4020 - cannot mutate immutable binding (Error)
  • W1015 - missing unwind safety (Warning)

Lowering

Phase page: /diagnostics/phases/lowering
  • E5000 - lowering unsupported construct (Error)
  • E5001 - async state machine spill failure (Error)
  • E5002 - try block lowering error (Error)
  • E5003 - const eval during lower (Error)
  • E5004 - intrinsic lowering mismatch (Error)
  • E5005 - pattern exhaustiveness MIR gap (Error)
  • E5006 - dyn dispatch metadata missing (Error)
  • E5007 - SIMD layout unsupported (Error)
  • E5008 - tail call lowering rejected (Error)
  • E5009 - GC/root lowering conflict (Error)
  • E5010 - debug info lowering incomplete (Warning)

Codegen

Phase page: /diagnostics/phases/codegen
  • E6000 - codegen failure (Error)
  • E6001 - unsupported target feature (Error)
  • E6002 - inline assembly constraint error (Error)
  • E6003 - linker undefined symbol (Error)
  • E6004 - duplicate symbol at link (Error)
  • E6005 - section alignment conflict (Error)
  • E6006 - PIE vs static relocation clash (Error)
  • E6007 - LTO mismatch (Error)
  • E6008 - debug vs release ABI clash (Error)
  • E6009 - wasm validation failure (Error)
  • E6010 - machine code emission overflow (Error)
  • W1014 - performance pessimization (Warning)

Runtime

Phase page: /diagnostics/phases/runtime
  • E8000 - invalid runtime artifact (Error)
  • E8001 - runtime entrypoint missing (Error)
  • E8002 - runtime execution failure (Error)
  • E8003 - runtime stack overflow (Error)
  • E8004 - runtime divide by zero (Error)
  • E8005 - runtime bounds check (Error)
  • E8006 - runtime null reference (Error)
  • E8007 - runtime assertion failed (Error)
  • E8008 - runtime panic unwind incomplete (Error)
  • E8009 - runtime fiber illegal resume (Error)
  • E8010 - runtime sandbox violation (Error)
  • E8011 - runtime OOM (Error)
  • E8012 - runtime deadlock detected (Error)
  • E8013 - runtime corrupted heap (Error)
  • E8014 - runtime JIT compile failure (Error)
  • E8015 - runtime watchdog timeout (Error)