From 7eefe2b4735b018efa50fa1e5ebfaf4db868ba22 Mon Sep 17 00:00:00 2001 From: Shotaro Yamada Date: Mon, 14 May 2018 12:07:34 +0900 Subject: Fix rustdoc panic with `impl Trait` in type parameters --- src/test/rustdoc/universal-impl-trait.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/test') diff --git a/src/test/rustdoc/universal-impl-trait.rs b/src/test/rustdoc/universal-impl-trait.rs index af51ff3d941..1c1124282d4 100644 --- a/src/test/rustdoc/universal-impl-trait.rs +++ b/src/test/rustdoc/universal-impl-trait.rs @@ -8,10 +8,10 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![feature(universal_impl_trait)] #![crate_name = "foo"] use std::io::Read; +use std::borrow::Borrow; // @has foo/fn.foo.html // @has - //pre 'foo(' @@ -51,3 +51,15 @@ impl S { // @has - 'method(' // @matches - '_x: impl Trait for S {} + +// @has foo/fn.much_universe.html +// @matches - 'T:.+Borrow.+impl .+trait\.Trait\.html' +// @matches - 'U:.+IntoIterator.+= impl.+Iterator\.html.+= impl.+Clone\.html' +// @matches - '_: impl .+trait\.Read\.html.+ \+ .+trait\.Clone\.html' +pub fn much_universe< + T: Borrow, + U: IntoIterator>, +>( + _: impl Read + Clone, +) { +} -- cgit 1.4.1-3-g733a5