Make ann_pattern and ann_type references

This commit is contained in:
Richard Feldman 2020-11-03 20:18:11 -05:00 committed by Sébastien Besnier
parent b0e4f4c97f
commit 6c01d02de0
3 changed files with 7 additions and 7 deletions

View file

@ -516,8 +516,8 @@ fn to_def<'a>(
(ann_pattern, ann_type),
Some((opt_comment, (body_pattern, body_expr))),
)) => Def::AnnotatedBody {
ann_pattern,
ann_type,
ann_pattern: arena.alloc(ann_pattern),
ann_type: arena.alloc(ann_type),
comment: opt_comment,
body_pattern: arena.alloc(body_pattern),
body_expr: arena.alloc(body_expr),
@ -854,8 +854,8 @@ fn parse_def_signature<'a>(
Region::span_across(&loc_first_pattern.region, &body_expr.region);
Located {
value: Def::AnnotatedBody {
ann_pattern: loc_first_pattern,
ann_type: loc_first_annotation,
ann_pattern: arena.alloc(loc_first_pattern),
ann_type: arena.alloc(loc_first_annotation),
comment: opt_comment,
body_pattern: arena.alloc(body_pattern),
body_expr: arena.alloc(body_expr),