aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/data.rs
diff options
context:
space:
mode:
authorPaul Daniel Faria <[email protected]>2020-06-27 22:11:43 +0100
committerPaul Daniel Faria <[email protected]>2020-08-10 13:44:54 +0100
commitd5f11e530dbf6edbdd0ca32d6cd5fafe634c8c4a (patch)
treeb348ea6d5552be08913ac3a451836cad5ac75c1a /crates/ra_hir_def/src/data.rs
parent38440d53d8329ac9f3f2013c6e32b3f69b069c72 (diff)
Unsafe borrow of packed fields: account for borrow through ref binding, auto ref function calls
Diffstat (limited to 'crates/ra_hir_def/src/data.rs')
-rw-r--r--crates/ra_hir_def/src/data.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/data.rs b/crates/ra_hir_def/src/data.rs
index 88a8ef9bf..2a26b0183 100644
--- a/crates/ra_hir_def/src/data.rs
+++ b/crates/ra_hir_def/src/data.rs
@@ -10,7 +10,7 @@ use crate::{
10 attr::Attrs, 10 attr::Attrs,
11 body::Expander, 11 body::Expander,
12 db::DefDatabase, 12 db::DefDatabase,
13 item_tree::{AssocItem, ItemTreeId, ModItem}, 13 item_tree::{AssocItem, ItemTreeId, ModItem, SelfParam},
14 type_ref::{TypeBound, TypeRef}, 14 type_ref::{TypeBound, TypeRef},
15 visibility::RawVisibility, 15 visibility::RawVisibility,
16 AssocContainerId, AssocItemId, ConstId, ConstLoc, FunctionId, FunctionLoc, HasModule, ImplId, 16 AssocContainerId, AssocItemId, ConstId, ConstLoc, FunctionId, FunctionLoc, HasModule, ImplId,
@@ -25,7 +25,7 @@ pub struct FunctionData {
25 pub attrs: Attrs, 25 pub attrs: Attrs,
26 /// True if the first param is `self`. This is relevant to decide whether this 26 /// True if the first param is `self`. This is relevant to decide whether this
27 /// can be called as a method. 27 /// can be called as a method.
28 pub has_self_param: bool, 28 pub self_param: Option<SelfParam>,
29 pub is_unsafe: bool, 29 pub is_unsafe: bool,
30 pub is_varargs: bool, 30 pub is_varargs: bool,
31 pub visibility: RawVisibility, 31 pub visibility: RawVisibility,
@@ -42,7 +42,7 @@ impl FunctionData {
42 params: func.params.to_vec(), 42 params: func.params.to_vec(),
43 ret_type: func.ret_type.clone(), 43 ret_type: func.ret_type.clone(),
44 attrs: item_tree.attrs(ModItem::from(loc.id.value).into()).clone(), 44 attrs: item_tree.attrs(ModItem::from(loc.id.value).into()).clone(),
45 has_self_param: func.has_self_param, 45 self_param: func.self_param,
46 is_unsafe: func.is_unsafe, 46 is_unsafe: func.is_unsafe,
47 is_varargs: func.is_varargs, 47 is_varargs: func.is_varargs,
48 visibility: item_tree[func.visibility].clone(), 48 visibility: item_tree[func.visibility].clone(),