aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-07-08 09:29:19 +0100
committerbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-07-08 09:29:19 +0100
commit5b19825e376b67aabbe8d5b163bf69b1acd92f04 (patch)
treebdf8054c58b9dba7116473ae4b0a772851a27c0c /crates/ra_hir/src/nameres.rs
parenta4316d6c63486d718f4d2e56d151180ef40ff0a1 (diff)
parent09b72489dd085dadce94b454408d18a36abb1681 (diff)
Merge #1507
1507: Constify KnownName's r=matklad a=mominul Closes #1503 Co-authored-by: Muhammad Mominul Huque <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/nameres.rs')
-rw-r--r--crates/ra_hir/src/nameres.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs
index c84d2eada..bbdc606cd 100644
--- a/crates/ra_hir/src/nameres.rs
+++ b/crates/ra_hir/src/nameres.rs
@@ -65,8 +65,8 @@ use test_utils::tested_by;
65 65
66use crate::{ 66use crate::{
67 diagnostics::DiagnosticSink, either::Either, ids::MacroDefId, 67 diagnostics::DiagnosticSink, either::Either, ids::MacroDefId,
68 nameres::diagnostics::DefDiagnostic, AsName, AstDatabase, AstId, BuiltinType, Crate, 68 nameres::diagnostics::DefDiagnostic, AstDatabase, AstId, BuiltinType, Crate, DefDatabase,
69 DefDatabase, HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, Trait, 69 HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, Trait,
70}; 70};
71 71
72pub(crate) use self::raw::{ImportSourceMap, RawItems}; 72pub(crate) use self::raw::{ImportSourceMap, RawItems};
@@ -138,8 +138,8 @@ pub struct ModuleScope {
138static BUILTIN_SCOPE: Lazy<FxHashMap<Name, Resolution>> = Lazy::new(|| { 138static BUILTIN_SCOPE: Lazy<FxHashMap<Name, Resolution>> = Lazy::new(|| {
139 BuiltinType::ALL 139 BuiltinType::ALL
140 .iter() 140 .iter()
141 .map(|&(known_name, ty)| { 141 .map(|(name, ty)| {
142 (known_name.as_name(), Resolution { def: PerNs::types(ty.into()), import: None }) 142 (name.clone(), Resolution { def: PerNs::types(ty.clone().into()), import: None })
143 }) 143 })
144 .collect() 144 .collect()
145}); 145});