Skip to content

Commit

Permalink
Fix ICE in rustdoc when merging generic and where bounds in the case …
Browse files Browse the repository at this point in the history
…of an Fn with an output

Fixes #57180
  • Loading branch information
Nashenas88 committed Aug 27, 2019
1 parent 9b91b9c commit c015927
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustdoc/clean/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Expand Down

0 comments on commit c015927

Please sign in to comment.