fn foo(x: Ty<'tcx>) {
match x.sty {
}
}
- Global <-- types that are global (u32) get allocated here
- Type-checking a specific fn
- local arena <-- types specific to type-checking
struct MyStruct<T> { x: u32, y: T }
// ^ def_id1
// ^ def_id2
// def_id => "Def path" => crate::foo::MyStruct
The many kinds of types
fn foo(x: Ty<'tcx>) {
match x.sty {
}
}
Interning
- Global <-- types that are global (u32) get allocated here
- Type-checking a specific fn
- local arena <-- types specific to type-checking
Generics and substitutions
struct MyStruct<T> { x: u32, y: T }
// ^ def_id1
// ^ def_id2
// def_id => "Def path" => crate::foo::MyStruct
Unsubstituted Generics