]> git.lizzy.rs Git - rust.git/commitdiff
Fix ICE in rustdoc when merging generic and where bounds in the case of an Fn with...
authorPaul Daniel Faria <Nashenas88@users.noreply.github.com>
Tue, 27 Aug 2019 04:20:21 +0000 (00:20 -0400)
committerPaul Daniel Faria <Nashenas88@users.noreply.github.com>
Tue, 27 Aug 2019 04:20:21 +0000 (00:20 -0400)
Fixes #57180

src/librustdoc/clean/simplify.rs

index 8758ab19691163ab4f93e847ed21d0c31d08b459..2142d6de5da5dce58783e5f54265d23281bb18e6 100644 (file)
@@ -122,9 +122,9 @@ pub fn merge_bounds(
                     },
                 });
             }
-            PP::Parenthesized { ref mut output, .. } => {
-                assert!(output.is_none());
-                if *rhs != clean::Type::Tuple(Vec::new()) {
+            PP::Parenthesized { ref mut output, .. } => match output {
+                Some(o) => assert!(o == rhs),
+                None => if *rhs != clean::Type::Tuple(Vec::new()) {
                     *output = Some(rhs.clone());
                 }
             }