Skip to content

Commit c015927

Browse files
committed
Fix ICE in rustdoc when merging generic and where bounds in the case of an Fn with an output
Fixes #57180
1 parent 9b91b9c commit c015927

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/clean/simplify.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ pub fn merge_bounds(
122122
},
123123
});
124124
}
125-
PP::Parenthesized { ref mut output, .. } => {
126-
assert!(output.is_none());
127-
if *rhs != clean::Type::Tuple(Vec::new()) {
125+
PP::Parenthesized { ref mut output, .. } => match output {
126+
Some(o) => assert!(o == rhs),
127+
None => if *rhs != clean::Type::Tuple(Vec::new()) {
128128
*output = Some(rhs.clone());
129129
}
130130
}

0 commit comments

Comments
 (0)