aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r--crates/hir/src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 2468c0dc6..bd923cba8 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -452,7 +452,7 @@ impl Module {
452 } 452 }
453 453
454 pub fn visibility_of(self, db: &dyn HirDatabase, def: &ModuleDef) -> Option<Visibility> { 454 pub fn visibility_of(self, db: &dyn HirDatabase, def: &ModuleDef) -> Option<Visibility> {
455 self.id.def_map(db.upcast())[self.id.local_id].scope.visibility_of(def.clone().into()) 455 self.id.def_map(db.upcast())[self.id.local_id].scope.visibility_of((*def).into())
456 } 456 }
457 457
458 pub fn diagnostics( 458 pub fn diagnostics(
@@ -1112,7 +1112,7 @@ impl Function {
1112 .collect(); 1112 .collect();
1113 sink.push(MissingFields { 1113 sink.push(MissingFields {
1114 file: source_ptr.file_id, 1114 file: source_ptr.file_id,
1115 field_list_parent: AstPtr::new(&record_expr), 1115 field_list_parent: AstPtr::new(record_expr),
1116 field_list_parent_path: record_expr 1116 field_list_parent_path: record_expr
1117 .path() 1117 .path()
1118 .map(|path| AstPtr::new(&path)), 1118 .map(|path| AstPtr::new(&path)),
@@ -2531,13 +2531,13 @@ impl Type {
2531 match ty.kind(&Interner) { 2531 match ty.kind(&Interner) {
2532 TyKind::Adt(_, substs) => { 2532 TyKind::Adt(_, substs) => {
2533 cb(type_.derived(ty.clone())); 2533 cb(type_.derived(ty.clone()));
2534 walk_substs(db, type_, &substs, cb); 2534 walk_substs(db, type_, substs, cb);
2535 } 2535 }
2536 TyKind::AssociatedType(_, substs) => { 2536 TyKind::AssociatedType(_, substs) => {
2537 if let Some(_) = ty.associated_type_parent_trait(db) { 2537 if let Some(_) = ty.associated_type_parent_trait(db) {
2538 cb(type_.derived(ty.clone())); 2538 cb(type_.derived(ty.clone()));
2539 } 2539 }
2540 walk_substs(db, type_, &substs, cb); 2540 walk_substs(db, type_, substs, cb);
2541 } 2541 }
2542 TyKind::OpaqueType(_, subst) => { 2542 TyKind::OpaqueType(_, subst) => {
2543 if let Some(bounds) = ty.impl_trait_bounds(db) { 2543 if let Some(bounds) = ty.impl_trait_bounds(db) {
@@ -2577,7 +2577,7 @@ impl Type {
2577 TyKind::FnDef(_, substs) 2577 TyKind::FnDef(_, substs)
2578 | TyKind::Tuple(_, substs) 2578 | TyKind::Tuple(_, substs)
2579 | TyKind::Closure(.., substs) => { 2579 | TyKind::Closure(.., substs) => {
2580 walk_substs(db, type_, &substs, cb); 2580 walk_substs(db, type_, substs, cb);
2581 } 2581 }
2582 TyKind::Function(hir_ty::FnPointer { substitution, .. }) => { 2582 TyKind::Function(hir_ty::FnPointer { substitution, .. }) => {
2583 walk_substs(db, type_, &substitution.0, cb); 2583 walk_substs(db, type_, &substitution.0, cb);