From f5165af9a7cdf9e43db0a95e717a47fa2bdf6c25 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 Mar 2019 22:33:26 +0300 Subject: make Name::new private --- crates/ra_hir/src/name.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir/src/name.rs') 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 { } impl Name { - pub(crate) fn new(text: SmolStr) -> Name { + /// Note: this is private to make creating name from random string hard. + /// Hopefully, this should allow us to integrate hygiene cleaner in the + /// future, and to switch to interned representation of names. + fn new(text: SmolStr) -> Name { Name { text } } -- cgit v1.2.3