aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/name.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-03-20 19:33:26 +0000
committerAleksey Kladov <[email protected]>2019-03-20 19:33:26 +0000
commitf5165af9a7cdf9e43db0a95e717a47fa2bdf6c25 (patch)
tree02b8a64f9e407476b212cd685615328e0dd6b896 /crates/ra_hir/src/name.rs
parent90ff3ba64133c1bcae9d49709c4dd704ae59b1ee (diff)
make Name::new private
Diffstat (limited to 'crates/ra_hir/src/name.rs')
-rw-r--r--crates/ra_hir/src/name.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ra_hir/src/name.rs b/crates/ra_hir/src/name.rs
index 06bafa6f0..677d18efc 100644
--- a/crates/ra_hir/src/name.rs
+++ b/crates/ra_hir/src/name.rs
@@ -23,7 +23,10 @@ impl fmt::Debug for Name {
23} 23}
24 24
25impl Name { 25impl Name {
26 pub(crate) fn new(text: SmolStr) -> Name { 26 /// Note: this is private to make creating name from random string hard.
27 /// Hopefully, this should allow us to integrate hygiene cleaner in the
28 /// future, and to switch to interned representation of names.
29 fn new(text: SmolStr) -> Name {
27 Name { text } 30 Name { text }
28 } 31 }
29 32