File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/tools/rust-analyzer/crates/hir-ty/src Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -632,6 +632,26 @@ impl InferenceResult {
632632 pub fn binding_mode ( & self , id : PatId ) -> Option < BindingMode > {
633633 self . binding_modes . get ( id) . copied ( )
634634 }
635+
636+ // This method is consumed by external tools to run rust-analyzer as a library. Don't remove, please.
637+ pub fn expression_types ( & self ) -> impl Iterator < Item = ( ExprId , & Ty ) > {
638+ self . type_of_expr . iter ( )
639+ }
640+
641+ // This method is consumed by external tools to run rust-analyzer as a library. Don't remove, please.
642+ pub fn pattern_types ( & self ) -> impl Iterator < Item = ( PatId , & Ty ) > {
643+ self . type_of_pat . iter ( )
644+ }
645+
646+ // This method is consumed by external tools to run rust-analyzer as a library. Don't remove, please.
647+ pub fn binding_types ( & self ) -> impl Iterator < Item = ( BindingId , & Ty ) > {
648+ self . type_of_binding . iter ( )
649+ }
650+
651+ // This method is consumed by external tools to run rust-analyzer as a library. Don't remove, please.
652+ pub fn return_position_impl_trait_types ( & self ) -> impl Iterator < Item = ( ImplTraitIdx , & Ty ) > {
653+ self . type_of_rpit . iter ( )
654+ }
635655}
636656
637657impl Index < ExprId > for InferenceResult {
You can’t perform that action at this time.
0 commit comments