Expand description
Crate loading and the symbol table.
We deliberately do not attempt real type inference. The measured property that makes this
sound for candle model code is that such code is monomorphic and uses inherent fn methods
on concrete structs — no trait objects, no generic modules. So a crate-local
struct -> field -> type table plus type -> methods is enough to resolve
SelfAttention::new(cfg, vb.pp("self_attn")) to a body.
Where that assumption breaks we record a diagnostic instead of guessing.
Structs§
- Crate
- Field
Def - ImplFn
- An inherent method on a concrete type.
- Import
Binding - Load
Diagnostic - Public
Reexport - A public
useleaf. Keeping the syntactic target is useful even when that target cannot be resolved without Cargo/rustc name resolution. - Source
File - Struct
Def - TypeRef
- A parsed field type, decomposed just enough to see through the containers candle model code actually uses.
Enums§
Functions§
- load
- Parse every
.rsfile underroot, skippingtarget/and hidden directories. - load_
from_ roots - Load only Rust modules reachable from the selected Cargo crate roots.
- span_of
- type_
base_ name - Last path segment of a type, e.g.
nn::Linear->Linear. - type_
ref - Peel
Vec<T>,Option<T>andBox<T>down to the named type inside. - type_
text