Unsafe borrow of packed fields: account for borrow through ref binding, auto ref function calls
This commit is contained in:
@@ -11,6 +11,7 @@ use hir_def::{
|
||||
docs::Documentation,
|
||||
expr::{BindingAnnotation, Pat, PatId},
|
||||
import_map,
|
||||
item_tree::SelfParam,
|
||||
per_ns::PerNs,
|
||||
resolver::{HasResolver, Resolver},
|
||||
src::HasSource as _,
|
||||
@@ -670,8 +671,8 @@ impl Function {
|
||||
db.function_data(self.id).name.clone()
|
||||
}
|
||||
|
||||
pub fn has_self_param(self, db: &dyn HirDatabase) -> bool {
|
||||
db.function_data(self.id).has_self_param
|
||||
pub fn self_param(self, db: &dyn HirDatabase) -> Option<SelfParam> {
|
||||
db.function_data(self.id).self_param
|
||||
}
|
||||
|
||||
pub fn params(self, db: &dyn HirDatabase) -> Vec<TypeRef> {
|
||||
|
||||
Reference in New Issue
Block a user