Skip to content

Commit f1d24be

Browse files
committed
rustdoc: add test case for "variadic tuple" search notation
1 parent 2bbf44f commit f1d24be

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// compile-flags: --crate-type lib --edition 2018
2+
3+
#![crate_name = "foo"]
4+
#![feature(rustdoc_internals)]
5+
6+
pub trait Foo {}
7+
8+
// @has foo/trait.Foo.html
9+
// @has - '//section[@id="impl-Foo-for-(T%2C)"]/h3' 'impl<T> Foo for (T₁, T₂, …, Tₙ)'
10+
#[doc(tuple_variadic)]
11+
impl<T> Foo for (T,) {}
12+
13+
pub trait Bar {}
14+
15+
// @has foo/trait.Bar.html
16+
// @has - '//section[@id="impl-Bar-for-(U%2C)"]/h3' 'impl<U: Foo> Bar for (U₁, U₂, …, Uₙ)'
17+
#[doc(tuple_variadic)]
18+
impl<U: Foo> Bar for (U,) {}

0 commit comments

Comments
 (0)