Skip to content

Commit f4687d5

Browse files
committed
rustdoc: Remove unused DocFragment.line field
1 parent 548c108 commit f4687d5

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/librustdoc/clean/types.rs

-5
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,6 @@ impl<I: Iterator<Item = ast::NestedMetaItem> + IntoIterator<Item = ast::NestedMe
906906
/// kept separate because of issue #42760.
907907
#[derive(Clone, PartialEq, Eq, Debug, Hash)]
908908
crate struct DocFragment {
909-
crate line: usize,
910909
crate span: rustc_span::Span,
911910
/// The module this doc-comment came from.
912911
///
@@ -1027,7 +1026,6 @@ impl Attributes {
10271026
additional_attrs: Option<(&[ast::Attribute], DefId)>,
10281027
) -> Attributes {
10291028
let mut doc_strings: Vec<DocFragment> = vec![];
1030-
let mut doc_line = 0;
10311029

10321030
fn update_need_backline(doc_strings: &mut Vec<DocFragment>) {
10331031
if let Some(prev) = doc_strings.last_mut() {
@@ -1045,10 +1043,7 @@ impl Attributes {
10451043
DocFragmentKind::RawDoc
10461044
};
10471045

1048-
let line = doc_line;
1049-
doc_line += value.as_str().lines().count();
10501046
let frag = DocFragment {
1051-
line,
10521047
span: attr.span,
10531048
doc: value,
10541049
kind,

src/librustdoc/passes/unindent_comments/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use rustc_span::symbol::Symbol;
55

66
fn create_doc_fragment(s: &str) -> Vec<DocFragment> {
77
vec![DocFragment {
8-
line: 0,
98
span: DUMMY_SP,
109
parent_module: None,
1110
doc: Symbol::intern(s),

0 commit comments

Comments
 (0)