···3683368336843684/// Converts the source start position of a documentation comment's contents into
36853685/// the position of the leading slash in its marker ('///').
36863686-fn get_doc_marker_pos(content_pos: u32) -> u32 {
36863686+fn get_doc_marker_position(content_pos: u32) -> u32 {
36873687 content_pos.saturating_sub(3)
36883688}
36893689···37833783 // Here we need to get position of the function, starting from the leading slash in the
37843784 // documentation comment's marker ('///'), not from comment's content (of which
37853785 // we have the position), so we must convert the content start position
37863786- // to the leading slash's position using 'get_doc_marker_pos'.
37863786+ // to the leading slash's position.
37873787 self.container_function_start = Some(
37883788 fun.documentation
37893789 .as_ref()
37903790- .map(|(doc_start, _)| get_doc_marker_pos(*doc_start))
37903790+ .map(|(doc_start, _)| get_doc_marker_position(*doc_start))
37913791 .unwrap_or(fun_location.start),
37923792 );
37933793
···491491 // By convention, the symbol span starts from the leading slash in the
492492 // documentation comment's marker ('///'), not from its content (of which
493493 // we have the position), so we must convert the content start position
494494- // to the leading slash's position using 'get_doc_marker_pos'.
494494+ // to the leading slash's position.
495495 let full_function_span = SrcSpan {
496496 start: function
497497 .documentation
498498 .as_ref()
499499- .map(|(doc_start, _)| get_doc_marker_pos(*doc_start))
499499+ .map(|(doc_start, _)| get_doc_marker_position(*doc_start))
500500 .unwrap_or(function.location.start),
501501502502 end: function.end_position,
···531531 for alias in &module.ast.definitions.type_aliases {
532532 let full_alias_span = match alias.documentation {
533533 Some((doc_position, _)) => {
534534- SrcSpan::new(get_doc_marker_pos(doc_position), alias.location.end)
534534+ SrcSpan::new(get_doc_marker_position(doc_position), alias.location.end)
535535 }
536536 None => alias.location,
537537 };
···573573 start: constant
574574 .documentation
575575 .as_ref()
576576- .map(|(doc_start, _)| get_doc_marker_pos(*doc_start))
576576+ .map(|(doc_start, _)| get_doc_marker_position(*doc_start))
577577 .unwrap_or(constant.location.start),
578578579579 end: constant.value.location().end,
···1099109911001100 let full_arg_span = match argument.doc {
11011101 Some((doc_position, _)) => {
11021102- SrcSpan::new(get_doc_marker_pos(doc_position), argument.location.end)
11021102+ SrcSpan::new(get_doc_marker_position(doc_position), argument.location.end)
11031103 }
11041104 None => argument.location,
11051105 };
···11311131 start: constructor
11321132 .documentation
11331133 .as_ref()
11341134- .map(|(doc_start, _)| get_doc_marker_pos(*doc_start))
11341134+ .map(|(doc_start, _)| get_doc_marker_position(*doc_start))
11351135 .unwrap_or(constructor.location.start),
1136113611371137 end: constructor.location.end,
···11701170 start: type_
11711171 .documentation
11721172 .as_ref()
11731173- .map(|(doc_start, _)| get_doc_marker_pos(*doc_start))
11731173+ .map(|(doc_start, _)| get_doc_marker_position(*doc_start))
11741174 .unwrap_or(type_.location.start),
1175117511761176 end: type_.end_position,
···1648164816491649/// Converts the source start position of a documentation comment's contents into
16501650/// the position of the leading slash in its marker ('///').
16511651-fn get_doc_marker_pos(content_pos: u32) -> u32 {
16511651+fn get_doc_marker_position(content_pos: u32) -> u32 {
16521652 content_pos.saturating_sub(3)
16531653}
16541654