File tree Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Expand file tree Collapse file tree 4 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1192,6 +1192,8 @@ class ArrayElemsValues : public ArrayElems
1192
1192
1193
1193
std::string as_string () const override ;
1194
1194
1195
+ location_t get_locus () const { return locus; }
1196
+
1195
1197
void accept_vis (ASTVisitor &vis) override ;
1196
1198
1197
1199
// TODO: this mutable getter seems really dodgy. Think up better way.
@@ -1248,6 +1250,8 @@ class ArrayElemsCopied : public ArrayElems
1248
1250
1249
1251
std::string as_string () const override ;
1250
1252
1253
+ location_t get_locus () const { return locus; }
1254
+
1251
1255
void accept_vis (ASTVisitor &vis) override ;
1252
1256
1253
1257
// TODO: is this better? Or is a "vis_block" better?
@@ -1777,6 +1781,8 @@ struct StructBase
1777
1781
1778
1782
std::string as_string () const ;
1779
1783
1784
+ location_t get_locus () const { return locus; }
1785
+
1780
1786
// TODO: is this better? Or is a "vis_block" better?
1781
1787
Expr &get_base_struct ()
1782
1788
{
Original file line number Diff line number Diff line change @@ -948,7 +948,7 @@ class StructPattern : public Pattern
948
948
* is empty). */
949
949
bool has_struct_pattern_elems () const { return !elems.is_empty (); }
950
950
951
- location_t get_locus () const override { return path. get_locus () ; }
951
+ location_t get_locus () const override { return locus ; }
952
952
953
953
void accept_vis (ASTVisitor &vis) override ;
954
954
Original file line number Diff line number Diff line change @@ -209,6 +209,8 @@ class LifetimeWhereClauseItem : public WhereClauseItem
209
209
210
210
std::string as_string () const override ;
211
211
212
+ location_t get_locus () const { return locus; }
213
+
212
214
void accept_vis (HIRFullVisitor &vis) override ;
213
215
214
216
Lifetime &get_lifetime () { return lifetime; }
Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ struct Visibility
73
73
}
74
74
75
75
std::string as_string () const ;
76
+
77
+ location_t get_locus () const { return locus; }
76
78
};
77
79
} // namespace HIR
78
80
} // namespace Rust
You can’t perform that action at this time.
0 commit comments