Skip to content

Commit

Permalink
Add regression test for issue, apply suggestion to convert to assert_eq
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashenas88 committed Aug 28, 2019
1 parent 09f6b44 commit 143b83a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/clean/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub fn merge_bounds(
});
}
PP::Parenthesized { ref mut output, .. } => match output {
Some(o) => assert!(o == rhs),
Some(o) => assert_eq!(o, rhs),
None => if *rhs != clean::Type::Tuple(Vec::new()) {
*output = Some(rhs.clone());
}
Expand Down
16 changes: 16 additions & 0 deletions src/test/rustdoc/auxiliary/issue-57180.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// compile-flags: -Cmetadata=aux

pub trait Trait {
}

pub struct Struct<F>
{
_p: ::std::marker::PhantomData<F>,
}

impl<F: Fn() -> u32>
Trait for Struct<F>
where
F: Fn() -> u32,
{
}
7 changes: 7 additions & 0 deletions src/test/rustdoc/issue-57180.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// aux-build:issue-57180.rs

extern crate issue_57180;
use issue_57180::Trait;

fn main() {
}

0 comments on commit 143b83a

Please sign in to comment.