Rename rustdoc_json_types::Item.source to span

This commit is contained in:
Camelid 2021-03-09 21:25:54 -08:00
parent 7dd475e498
commit e190983bd3
3 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ pub(super) fn convert_item(&self, item: clean::Item) -> Option<Item> {
id: from_def_id(def_id), id: from_def_id(def_id),
crate_id: def_id.krate.as_u32(), crate_id: def_id.krate.as_u32(),
name: name.map(|sym| sym.to_string()), name: name.map(|sym| sym.to_string()),
source: self.convert_span(span), span: self.convert_span(span),
visibility: self.convert_visibility(visibility), visibility: self.convert_visibility(visibility),
docs: attrs.collapsed_doc_value(), docs: attrs.collapsed_doc_value(),
links: attrs links: attrs

View File

@ -109,7 +109,7 @@ fn get_trait_items(&mut self) -> Vec<(types::Id, types::Item)> {
.map(Clone::clone), .map(Clone::clone),
visibility: types::Visibility::Public, visibility: types::Visibility::Public,
inner: types::ItemEnum::Trait(trait_item.clone().into()), inner: types::ItemEnum::Trait(trait_item.clone().into()),
source: None, span: None,
docs: Default::default(), docs: Default::default(),
links: Default::default(), links: Default::default(),
attrs: Default::default(), attrs: Default::default(),

View File

@ -64,7 +64,7 @@ pub struct Item {
pub name: Option<String>, pub name: Option<String>,
/// The source location of this item (absent if it came from a macro expansion or inline /// The source location of this item (absent if it came from a macro expansion or inline
/// assembly). /// assembly).
pub source: Option<Span>, pub span: Option<Span>,
/// By default all documented items are public, but you can tell rustdoc to output private items /// By default all documented items are public, but you can tell rustdoc to output private items
/// so this field is needed to differentiate. /// so this field is needed to differentiate.
pub visibility: Visibility, pub visibility: Visibility,