@@ -592,7 +592,7 @@ pub impl NameBindings {
592592 }
593593
594594 /// Returns the module node if applicable.
595- fn get_module_if_available() -> Option<@mut Module> {
595+ fn get_module_if_available(&self ) -> Option<@mut Module> {
596596 match self.type_def {
597597 Some(ref type_def) => (*type_def).module_def,
598598 None => None
@@ -613,14 +613,14 @@ pub impl NameBindings {
613613 }
614614 }
615615
616- fn defined_in_namespace(namespace: Namespace) -> bool {
616+ fn defined_in_namespace(&self, namespace: Namespace) -> bool {
617617 match namespace {
618618 TypeNS => return self.type_def.is_some(),
619619 ValueNS => return self.value_def.is_some()
620620 }
621621 }
622622
623- fn defined_in_public_namespace(namespace: Namespace) -> bool {
623+ fn defined_in_public_namespace(&self, namespace: Namespace) -> bool {
624624 match namespace {
625625 TypeNS => match self.type_def {
626626 Some(def) => def.privacy != Private,
@@ -633,7 +633,7 @@ pub impl NameBindings {
633633 }
634634 }
635635
636- fn def_for_namespace(namespace: Namespace) -> Option<def> {
636+ fn def_for_namespace(&self, namespace: Namespace) -> Option<def> {
637637 match namespace {
638638 TypeNS => {
639639 match self.type_def {
@@ -666,7 +666,7 @@ pub impl NameBindings {
666666 }
667667 }
668668
669- fn privacy_for_namespace(namespace: Namespace) -> Option<Privacy> {
669+ fn privacy_for_namespace(&self, namespace: Namespace) -> Option<Privacy> {
670670 match namespace {
671671 TypeNS => {
672672 match self.type_def {
@@ -683,7 +683,7 @@ pub impl NameBindings {
683683 }
684684 }
685685
686- fn span_for_namespace(namespace: Namespace) -> Option<span> {
686+ fn span_for_namespace(&self, namespace: Namespace) -> Option<span> {
687687 if self.defined_in_namespace(namespace) {
688688 match namespace {
689689 TypeNS => self.type_span,
0 commit comments