Skip to content

Commit 143b83a

Browse files
committed
Add regression test for issue, apply suggestion to convert to assert_eq
1 parent 09f6b44 commit 143b83a

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

src/librustdoc/clean/simplify.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ pub fn merge_bounds(
118118
});
119119
}
120120
PP::Parenthesized { ref mut output, .. } => match output {
121-
Some(o) => assert!(o == rhs),
121+
Some(o) => assert_eq!(o, rhs),
122122
None => if *rhs != clean::Type::Tuple(Vec::new()) {
123123
*output = Some(rhs.clone());
124124
}
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// compile-flags: -Cmetadata=aux
2+
3+
pub trait Trait {
4+
}
5+
6+
pub struct Struct<F>
7+
{
8+
_p: ::std::marker::PhantomData<F>,
9+
}
10+
11+
impl<F: Fn() -> u32>
12+
Trait for Struct<F>
13+
where
14+
F: Fn() -> u32,
15+
{
16+
}

src/test/rustdoc/issue-57180.rs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// aux-build:issue-57180.rs
2+
3+
extern crate issue_57180;
4+
use issue_57180::Trait;
5+
6+
fn main() {
7+
}

0 commit comments

Comments
 (0)