1
Fork 0

rustdoc: we can now assume DocContext always has a TyCtxt.

This commit is contained in:
Eduard-Mihai Burtescu 2016-11-20 03:42:54 +02:00
parent e68ad42dfa
commit 4be7786330
6 changed files with 220 additions and 328 deletions

View file

@ -49,7 +49,7 @@ impl<'a, 'b, 'tcx> LibEmbargoVisitor<'a, 'b, 'tcx> {
// Updates node level and returns the updated level
fn update(&mut self, did: DefId, level: Option<AccessLevel>) -> Option<AccessLevel> {
let is_hidden = self.cx.tcx().get_attrs(did).lists("doc").has_word("hidden");
let is_hidden = self.cx.tcx.get_attrs(did).lists("doc").has_word("hidden");
let old_level = self.access_levels.map.get(&did).cloned();
// Accessibility levels can only grow