1
Fork 0

respect doc(hidden) when suggesting available fields

This commit is contained in:
Ibraheem Ahmed 2022-01-22 15:47:02 -05:00
parent cbaeec14f9
commit 32ab0b88f4
3 changed files with 44 additions and 0 deletions

View file

@ -1794,6 +1794,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
.1;
field.vis.is_accessible_from(def_scope, self.tcx)
})
.filter(|field| !self.tcx.is_doc_hidden(field.did))
.map(|field| field.name)
.collect()
}