From 21f20d5debe141e5c0d34ab56c4563a8be077aca Mon Sep 17 00:00:00 2001 From: Vincent Esche Date: Wed, 20 Mar 2019 09:29:10 +0100 Subject: =?UTF-8?q?Fixed=20typo=20in=20`Interner`=E2=80=99s=20name=20(`Int?= =?UTF-8?q?ener`)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/ra_db/src/lib.rs | 2 +- crates/ra_db/src/loc2id.rs | 10 +++++----- crates/ra_hir/src/ids.rs | 34 +++++++++++++++++----------------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index e006c6d27..f3389c91f 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs @@ -16,7 +16,7 @@ pub use crate::{ input::{ FileId, CrateId, SourceRoot, SourceRootId, CrateGraph, Dependency, Edition, }, - loc2id::LocationIntener, + loc2id::LocationInterner, }; pub trait CheckCanceled: panic::RefUnwindSafe { diff --git a/crates/ra_db/src/loc2id.rs b/crates/ra_db/src/loc2id.rs index d27fa7682..eae64a4eb 100644 --- a/crates/ra_db/src/loc2id.rs +++ b/crates/ra_db/src/loc2id.rs @@ -59,7 +59,7 @@ where } #[derive(Debug)] -pub struct LocationIntener +pub struct LocationInterner where ID: ArenaId + Clone, LOC: Clone + Eq + Hash, @@ -67,7 +67,7 @@ where map: Mutex>, } -impl panic::RefUnwindSafe for LocationIntener +impl panic::RefUnwindSafe for LocationInterner where ID: ArenaId + Clone, LOC: Clone + Eq + Hash, @@ -76,17 +76,17 @@ where { } -impl Default for LocationIntener +impl Default for LocationInterner where ID: ArenaId + Clone, LOC: Clone + Eq + Hash, { fn default() -> Self { - LocationIntener { map: Default::default() } + LocationInterner { map: Default::default() } } } -impl LocationIntener +impl LocationInterner where ID: ArenaId + Clone, LOC: Clone + Eq + Hash, diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs index 9596488d3..3d0a881c2 100644 --- a/crates/ra_hir/src/ids.rs +++ b/crates/ra_hir/src/ids.rs @@ -4,7 +4,7 @@ use std::{ sync::Arc, }; -use ra_db::{LocationIntener, FileId}; +use ra_db::{LocationInterner, FileId}; use ra_syntax::{TreeArc, SyntaxNode, SourceFile, AstNode, SyntaxNodePtr, ast}; use ra_arena::{Arena, RawId, ArenaId, impl_arena_id}; @@ -15,14 +15,14 @@ use crate::{ #[derive(Debug, Default)] pub struct HirInterner { - macros: LocationIntener, - fns: LocationIntener, FunctionId>, - structs: LocationIntener, StructId>, - enums: LocationIntener, EnumId>, - consts: LocationIntener, ConstId>, - statics: LocationIntener, StaticId>, - traits: LocationIntener, TraitId>, - types: LocationIntener, TypeId>, + macros: LocationInterner, + fns: LocationInterner, FunctionId>, + structs: LocationInterner, StructId>, + enums: LocationInterner, EnumId>, + consts: LocationInterner, ConstId>, + statics: LocationInterner, StaticId>, + traits: LocationInterner, TraitId>, + types: LocationInterner, TypeId>, } impl HirInterner { @@ -204,7 +204,7 @@ impl<'a, DB: PersistentHirDatabase> LocationCtx<&'a DB> { } pub(crate) trait AstItemDef: ArenaId + Clone { - fn interner(interner: &HirInterner) -> &LocationIntener, Self>; + fn interner(interner: &HirInterner) -> &LocationInterner, Self>; fn from_ast(ctx: LocationCtx<&impl PersistentHirDatabase>, ast: &N) -> Self { let items = ctx.db.file_items(ctx.file_id); let item_id = items.id_of(ctx.file_id, ast.syntax()); @@ -238,7 +238,7 @@ pub(crate) trait AstItemDef: ArenaId + Clone { pub struct FunctionId(RawId); impl_arena_id!(FunctionId); impl AstItemDef for FunctionId { - fn interner(interner: &HirInterner) -> &LocationIntener, Self> { + fn interner(interner: &HirInterner) -> &LocationInterner, Self> { &interner.fns } } @@ -247,7 +247,7 @@ impl AstItemDef for FunctionId { pub struct StructId(RawId); impl_arena_id!(StructId); impl AstItemDef for StructId { - fn interner(interner: &HirInterner) -> &LocationIntener, Self> { + fn interner(interner: &HirInterner) -> &LocationInterner, Self> { &interner.structs } } @@ -256,7 +256,7 @@ impl AstItemDef for StructId { pub struct EnumId(RawId); impl_arena_id!(EnumId); impl AstItemDef for EnumId { - fn interner(interner: &HirInterner) -> &LocationIntener, Self> { + fn interner(interner: &HirInterner) -> &LocationInterner, Self> { &interner.enums } } @@ -265,7 +265,7 @@ impl AstItemDef for EnumId { pub struct ConstId(RawId); impl_arena_id!(ConstId); impl AstItemDef for ConstId { - fn interner(interner: &HirInterner) -> &LocationIntener, Self> { + fn interner(interner: &HirInterner) -> &LocationInterner, Self> { &interner.consts } } @@ -274,7 +274,7 @@ impl AstItemDef for ConstId { pub struct StaticId(RawId); impl_arena_id!(StaticId); impl AstItemDef for StaticId { - fn interner(interner: &HirInterner) -> &LocationIntener, Self> { + fn interner(interner: &HirInterner) -> &LocationInterner, Self> { &interner.statics } } @@ -283,7 +283,7 @@ impl AstItemDef for StaticId { pub struct TraitId(RawId); impl_arena_id!(TraitId); impl AstItemDef for TraitId { - fn interner(interner: &HirInterner) -> &LocationIntener, Self> { + fn interner(interner: &HirInterner) -> &LocationInterner, Self> { &interner.traits } } @@ -292,7 +292,7 @@ impl AstItemDef for TraitId { pub struct TypeId(RawId); impl_arena_id!(TypeId); impl AstItemDef for TypeId { - fn interner(interner: &HirInterner) -> &LocationIntener, Self> { + fn interner(interner: &HirInterner) -> &LocationInterner, Self> { &interner.types } } -- cgit v1.2.3