1- use self :: Namespace :: * ;
2-
31use crate :: hir;
42use crate :: hir:: def_id:: { DefId , DefIdMap , CRATE_DEF_INDEX , LOCAL_CRATE } ;
53use crate :: ty;
@@ -238,9 +236,9 @@ pub enum Namespace {
238236impl Namespace {
239237 pub fn descr ( self ) -> & ' static str {
240238 match self {
241- TypeNS => "type" ,
242- ValueNS => "value" ,
243- MacroNS => "macro" ,
239+ Self :: TypeNS => "type" ,
240+ Self :: ValueNS => "value" ,
241+ Self :: MacroNS => "macro" ,
244242 }
245243 }
246244}
@@ -264,19 +262,19 @@ impl<T> ::std::ops::Index<Namespace> for PerNS<T> {
264262
265263 fn index ( & self , ns : Namespace ) -> & T {
266264 match ns {
267- ValueNS => & self . value_ns ,
268- TypeNS => & self . type_ns ,
269- MacroNS => & self . macro_ns ,
265+ Namespace :: ValueNS => & self . value_ns ,
266+ Namespace :: TypeNS => & self . type_ns ,
267+ Namespace :: MacroNS => & self . macro_ns ,
270268 }
271269 }
272270}
273271
274272impl < T > :: std:: ops:: IndexMut < Namespace > for PerNS < T > {
275273 fn index_mut ( & mut self , ns : Namespace ) -> & mut T {
276274 match ns {
277- ValueNS => & mut self . value_ns ,
278- TypeNS => & mut self . type_ns ,
279- MacroNS => & mut self . macro_ns ,
275+ Namespace :: ValueNS => & mut self . value_ns ,
276+ Namespace :: TypeNS => & mut self . type_ns ,
277+ Namespace :: MacroNS => & mut self . macro_ns ,
280278 }
281279 }
282280}
0 commit comments