Add regression test for issue, apply suggestion to convert to assert_eq

This commit is contained in:
Paul Daniel Faria 2019-08-28 00:21:30 -04:00
parent 09f6b44790
commit 143b83a3c1
3 changed files with 24 additions and 1 deletions

View File

@ -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());
}

View File

@ -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,
{
}

View File

@ -0,0 +1,7 @@
// aux-build:issue-57180.rs
extern crate issue_57180;
use issue_57180::Trait;
fn main() {
}