fn update(&mut self, did: DefId, level: Option<AccessLevel>) -> Option<AccessLevel> {
        let attrs: Vec<_> = self.cx.tcx().get_attrs(did).iter()
                                                        .map(|a| a.clean(self.cx))
                                                        .collect();
        let is_hidden = attrs.list("doc").has_word("hidden");

        let old_level = self.access_levels.map.get(&did).cloned();
        // Accessibility levels can only grow
        if level > old_level && !is_hidden {
            self.access_levels.map.insert(did, level.unwrap());
            level
        } else {
            old_level
        }
    }
// Updates node level and returns the updated level
Updates node level and returns the updated level
Updates node level and returns the updated level
fn update(&mut self, did: DefId, level: Option<AccessLevel>) -> Option<AccessLevel> {
        let attrs: Vec<_> = self.cx.tcx().get_attrs(did).iter()
                                                        .map(|a| a.clean(self.cx))
                                                        .collect();
        let is_hidden = attrs.list("doc").has_word("hidden");
        let old_level = self.access_levels.map.get(&did).cloned();
        // Accessibility levels can only grow
        if level > old_level && !is_hidden {
            self.access_levels.map.insert(did, level.unwrap());
            level
        } else {
            old_level
        }
    }
fn update ( & mut self , did : DefId , level : Option < AccessLevel > ) -> Option < AccessLevel > { let attrs : Vec < _ > = self . cx . tcx ( ) . get_attrs ( did ) . iter ( ) . map ( | a | a . clean ( self . cx ) ) . collect ( ) ; let is_hidden = attrs . list ( " " ) . has_word ( " " ) ; let old_level = self . access_levels . map . get ( & did ) . cloned ( ) ; // Accessibility levels can only grow if level > old_level && ! is_hidden { self . access_levels . map . insert ( did , level . unwrap ( ) ) ; level } else { old_level } }
Updates node level and returns the updated level
Updates node level and returns the updated level
&mut self
did
DefId
level
Option<AccessLevel>
&mut self
did
DefId
level
Option<AccessLevel>