aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/name.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-03-20 22:08:30 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-03-20 22:08:30 +0000
commit1eb3bf41d75a8c744a0ecb586d4a2e92a1175c08 (patch)
tree6c2ddb0c296c566e9074eb316fafdce8807bcef2 /crates/ra_hir/src/name.rs
parent8b61ea127c596e4305acffa0d9180e48bd57f6c4 (diff)
parentf5165af9a7cdf9e43db0a95e717a47fa2bdf6c25 (diff)
Merge #1003
1003: make Name::new private r=flodiebold a=matklad This maybe is overengineering, but it seems cool to keep names completely opaque. r? @flodiebold Co-authored-by: Aleksey Kladov <[email protected]>
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