aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres.rs
diff options
context:
space:
mode:
authorMuhammad Mominul Huque <[email protected]>2019-07-07 22:29:38 +0100
committerMuhammad Mominul Huque <[email protected]>2019-07-07 22:29:38 +0100
commit012fec54dc508896493d5d3073b4786c93d66fe9 (patch)
treee2cd7f786de128b0d0503dcd3931212ee37220b3 /crates/ra_hir/src/nameres.rs
parent1b38ca3b8739230af1cc69884b5b11650b5fcb46 (diff)
Constify KnownName's
Diffstat (limited to 'crates/ra_hir/src/nameres.rs')
-rw-r--r--crates/ra_hir/src/nameres.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/nameres.rs b/crates/ra_hir/src/nameres.rs
index c84d2eada..4c5623063 100644
--- a/crates/ra_hir/src/nameres.rs
+++ b/crates/ra_hir/src/nameres.rs
@@ -65,7 +65,7 @@ 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,
69 DefDatabase, HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, Trait, 69 DefDatabase, HirFileId, MacroDef, Module, ModuleDef, Name, Path, PathKind, Trait,
70}; 70};
71 71
@@ -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});