diff options
| author | Paul Daniel Faria <Nashenas88@users.noreply.github.com> | 2019-08-28 00:21:30 -0400 |
|---|---|---|
| committer | Paul Daniel Faria <Nashenas88@users.noreply.github.com> | 2019-08-28 00:21:30 -0400 |
| commit | 143b83a3c1e3a03d9795b891e4f2298c5e59f66a (patch) | |
| tree | c0bb0e4a00e5f28dce895688a24668d5e7cb5c48 | |
| parent | 09f6b44790afa924aabf723518931191d92eb472 (diff) | |
| download | rust-143b83a3c1e3a03d9795b891e4f2298c5e59f66a.tar.gz rust-143b83a3c1e3a03d9795b891e4f2298c5e59f66a.zip | |
Add regression test for issue, apply suggestion to convert to assert_eq
| -rw-r--r-- | src/librustdoc/clean/simplify.rs | 2 | ||||
| -rw-r--r-- | src/test/rustdoc/auxiliary/issue-57180.rs | 16 | ||||
| -rw-r--r-- | src/test/rustdoc/issue-57180.rs | 7 |
3 files changed, 24 insertions, 1 deletions
diff --git a/src/librustdoc/clean/simplify.rs b/src/librustdoc/clean/simplify.rs index 73bc0386326..853170542e0 100644 --- a/src/librustdoc/clean/simplify.rs +++ b/src/librustdoc/clean/simplify.rs @@ -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()); } diff --git a/src/test/rustdoc/auxiliary/issue-57180.rs b/src/test/rustdoc/auxiliary/issue-57180.rs new file mode 100644 index 00000000000..4e2f4b87c02 --- /dev/null +++ b/src/test/rustdoc/auxiliary/issue-57180.rs @@ -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, +{ +} diff --git a/src/test/rustdoc/issue-57180.rs b/src/test/rustdoc/issue-57180.rs new file mode 100644 index 00000000000..14bd2b0fec0 --- /dev/null +++ b/src/test/rustdoc/issue-57180.rs @@ -0,0 +1,7 @@ +// aux-build:issue-57180.rs + +extern crate issue_57180; +use issue_57180::Trait; + +fn main() { +} |
