File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed 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 {
632
632
pub fn binding_mode ( & self , id : PatId ) -> Option < BindingMode > {
633
633
self . binding_modes . get ( id) . copied ( )
634
634
}
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
+ }
635
655
}
636
656
637
657
impl Index < ExprId > for InferenceResult {
You can’t perform that action at this time.
0 commit comments