Binding ourself to the compiler will remove make us cumbersome. Instead, provide a TypeQuery trait, wich the caller will implement. This makes it possible, to e.g. leverage the RLS capabilities without fixing ourself to the compiler, as the would update the query trait on its own.
Specific design is open. Some thoughts:
is_type_from_std(&ast::TyKind) / query_type_id(&ast::TyKind). The caller would need to be able to provide more information, especially in generic contexts, where the type of a function is defined by inference.
Goals
Binding ourself to the compiler will remove make us cumbersome. Instead, provide a TypeQuery trait, wich the caller will implement. This makes it possible, to e.g. leverage the RLS capabilities without fixing ourself to the compiler, as the would update the query trait on its own.
Specific design is open. Some thoughts:
is_type_from_std(&ast::TyKind)/query_type_id(&ast::TyKind). The caller would need to be able to provide more information, especially in generic contexts, where the type of a function is defined by inference.Goals