diff --git a/src/librustdoc/json/conversions.rs b/src/librustdoc/json/conversions.rs index 2b3d5fd7465..023f392563e 100644 --- a/src/librustdoc/json/conversions.rs +++ b/src/librustdoc/json/conversions.rs @@ -33,7 +33,7 @@ pub(super) fn convert_item(&self, item: clean::Item) -> Option { id: from_def_id(def_id), crate_id: def_id.krate.as_u32(), name: name.map(|sym| sym.to_string()), - source: self.convert_span(span), + span: self.convert_span(span), visibility: self.convert_visibility(visibility), docs: attrs.collapsed_doc_value(), links: attrs diff --git a/src/librustdoc/json/mod.rs b/src/librustdoc/json/mod.rs index b762fd7e18b..9dc2a442cff 100644 --- a/src/librustdoc/json/mod.rs +++ b/src/librustdoc/json/mod.rs @@ -109,7 +109,7 @@ fn get_trait_items(&mut self) -> Vec<(types::Id, types::Item)> { .map(Clone::clone), visibility: types::Visibility::Public, inner: types::ItemEnum::Trait(trait_item.clone().into()), - source: None, + span: None, docs: Default::default(), links: Default::default(), attrs: Default::default(), diff --git a/src/rustdoc-json-types/lib.rs b/src/rustdoc-json-types/lib.rs index 4e7794fe610..82064f31f58 100644 --- a/src/rustdoc-json-types/lib.rs +++ b/src/rustdoc-json-types/lib.rs @@ -64,7 +64,7 @@ pub struct Item { pub name: Option, /// The source location of this item (absent if it came from a macro expansion or inline /// assembly). - pub source: Option, + pub span: Option, /// By default all documented items are public, but you can tell rustdoc to output private items /// so this field is needed to differentiate. pub visibility: Visibility,