Rollup merge of #75665 - GuillaumeGomez:doc-examples-coverage, r=jyn514
Add doc examples coverage r? @jyn514
This commit is contained in:
commit
98f7d882c8
13 changed files with 173 additions and 77 deletions
|
|
@ -200,10 +200,12 @@ fn get_index_type_name(clean_type: &clean::Type, accept_generic: bool) -> Option
|
|||
match *clean_type {
|
||||
clean::ResolvedPath { ref path, .. } => {
|
||||
let segments = &path.segments;
|
||||
let path_segment = segments.iter().last().unwrap_or_else(|| panic!(
|
||||
let path_segment = segments.iter().last().unwrap_or_else(|| {
|
||||
panic!(
|
||||
"get_index_type_name(clean_type: {:?}, accept_generic: {:?}) had length zero path",
|
||||
clean_type, accept_generic
|
||||
));
|
||||
)
|
||||
});
|
||||
Some(path_segment.name.clone())
|
||||
}
|
||||
clean::Generic(ref s) if accept_generic => Some(s.clone()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue