From: Paul Daniel Faria Date: Tue, 27 Aug 2019 04:20:21 +0000 (-0400) Subject: Fix ICE in rustdoc when merging generic and where bounds in the case of an Fn with... X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=c015927af3604ec5305e078c1a57c81901f81190;p=rust.git Fix ICE in rustdoc when merging generic and where bounds in the case of an Fn with an output Fixes #57180 --- diff --git a/src/librustdoc/clean/simplify.rs b/src/librustdoc/clean/simplify.rs index 8758ab19691..2142d6de5da 100644 --- a/src/librustdoc/clean/simplify.rs +++ b/src/librustdoc/clean/simplify.rs @@ -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()); } }