about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-08-19 06:59:13 +0000
committerbors <bors@rust-lang.org>2020-08-19 06:59:13 +0000
commit5b04bbfcbb79ed7325ea2b580458a80d95da6bbb (patch)
tree54f153779798d43bf66667e385982b6d2f9f9711 /src/librustdoc/html
parentc03c213daf5fe3b52c768b4f145e45d8994d87ea (diff)
parent07ea340e89a4938a26039bceac6dbc1376978a48 (diff)
downloadrust-5b04bbfcbb79ed7325ea2b580458a80d95da6bbb.tar.gz
rust-5b04bbfcbb79ed7325ea2b580458a80d95da6bbb.zip
Auto merge of #75692 - JohnTitor:rollup-8gr04ah, r=JohnTitor
Rollup of 9 pull requests

Successful merges:

 - #75038 (See also X-Link mem::{swap, take, replace})
 - #75049 (docs(marker/copy): provide example for `&T` being `Copy`)
 - #75499 (Fix documentation error)
 - #75554 (Fix clashing_extern_declarations stack overflow for recursive types.)
 - #75646 (Move to intra doc links for keyword documentation)
 - #75652 (Resolve true and false as booleans)
 - #75658 (Don't emit "is not a logical operator" error outside of associative expressions)
 - #75665 (Add doc examples coverage)
 - #75685 (Switch to intra-doc links in /src/sys/unix/ext/*.rs)

Failed merges:

r? @ghost
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/render/cache.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustdoc/html/render/cache.rs b/src/librustdoc/html/render/cache.rs
index 5a9e9dda677..ccc07645620 100644
--- a/src/librustdoc/html/render/cache.rs
+++ b/src/librustdoc/html/render/cache.rs
@@ -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()),