mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-17 18:57:04 +00:00
feat: parse unsafe record fields
This commit is contained in:
parent
d3aeddfb77
commit
452e2ca031
9 changed files with 39 additions and 9 deletions
|
|
@ -320,7 +320,7 @@ impl<'a> Ctx<'a> {
|
|||
let visibility = self.lower_visibility(field);
|
||||
let type_ref = TypeRef::from_ast_opt(body_ctx, field.ty());
|
||||
|
||||
Field { name, type_ref, visibility }
|
||||
Field { name, type_ref, visibility, is_unsafe: field.unsafe_token().is_some() }
|
||||
}
|
||||
|
||||
fn lower_tuple_field(
|
||||
|
|
@ -332,7 +332,7 @@ impl<'a> Ctx<'a> {
|
|||
let name = Name::new_tuple_field(idx);
|
||||
let visibility = self.lower_visibility(field);
|
||||
let type_ref = TypeRef::from_ast_opt(body_ctx, field.ty());
|
||||
Field { name, type_ref, visibility }
|
||||
Field { name, type_ref, visibility, is_unsafe: false }
|
||||
}
|
||||
|
||||
fn lower_union(&mut self, union: &ast::Union) -> Option<FileItemTreeId<Union>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue