rustdoc: Remove unused DocFragment.line field

This commit is contained in:
Noah Lev 2021-11-18 22:57:09 -05:00
parent 548c1088ef
commit f4687d5381
2 changed files with 0 additions and 6 deletions

View file

@ -906,7 +906,6 @@ impl<I: Iterator<Item = ast::NestedMetaItem> + IntoIterator<Item = ast::NestedMe
/// kept separate because of issue #42760.
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
crate struct DocFragment {
crate line: usize,
crate span: rustc_span::Span,
/// The module this doc-comment came from.
///
@ -1027,7 +1026,6 @@ impl Attributes {
additional_attrs: Option<(&[ast::Attribute], DefId)>,
) -> Attributes {
let mut doc_strings: Vec<DocFragment> = vec![];
let mut doc_line = 0;
fn update_need_backline(doc_strings: &mut Vec<DocFragment>) {
if let Some(prev) = doc_strings.last_mut() {
@ -1045,10 +1043,7 @@ impl Attributes {
DocFragmentKind::RawDoc
};
let line = doc_line;
doc_line += value.as_str().lines().count();
let frag = DocFragment {
line,
span: attr.span,
doc: value,
kind,

View file

@ -5,7 +5,6 @@ use rustc_span::symbol::Symbol;
fn create_doc_fragment(s: &str) -> Vec<DocFragment> {
vec![DocFragment {
line: 0,
span: DUMMY_SP,
parent_module: None,
doc: Symbol::intern(s),