File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,24 @@ class ASTLoweringType : public ASTLoweringBase
278
278
translated);
279
279
}
280
280
281
+ void visit (AST::SliceType &type) override
282
+ {
283
+ HIR::Type *base_type
284
+ = ASTLoweringType::translate (type.get_elem_type ().get ());
285
+
286
+ auto crate_num = mappings->get_current_crate ();
287
+ Analysis::NodeMapping mapping (crate_num, type.get_node_id (),
288
+ mappings->get_next_hir_id (crate_num),
289
+ mappings->get_next_localdef_id (crate_num));
290
+
291
+ translated
292
+ = new HIR::SliceType (mapping, std::unique_ptr<HIR::Type> (base_type),
293
+ type.get_locus ());
294
+
295
+ mappings->insert_hir_type (mapping.get_crate_num (), mapping.get_hirid (),
296
+ translated);
297
+ }
298
+
281
299
void visit (AST::InferredType &type) override
282
300
{
283
301
auto crate_num = mappings->get_current_crate ();
You can’t perform that action at this time.
0 commit comments