Render missing fields in tuple struct/enum as /* private fields */
This commit is contained in:
parent
3767e315ac
commit
1abbd4cd4f
7 changed files with 38 additions and 22 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#![crate_name = "foo"]
|
||||
|
||||
// @has foo/struct.Foo.html '//pre[@class="rust item-decl"]' \
|
||||
// 'pub struct Foo<const M: usize = 10, const N: usize = M, T = i32>(_);'
|
||||
// 'pub struct Foo<const M: usize = 10, const N: usize = M, T = i32>('
|
||||
pub struct Foo<const M: usize = 10, const N: usize = M, T = i32>(T);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ impl<const N: usize> Trait<N> for [u8; N] {}
|
|||
// @has foo/struct.Foo.html '//pre[@class="rust item-decl"]' \
|
||||
// 'pub struct Foo<const N: usize> where u8: Trait<N>'
|
||||
pub struct Foo<const N: usize> where u8: Trait<N>;
|
||||
// @has foo/struct.Bar.html '//pre[@class="rust item-decl"]' 'pub struct Bar<T, const N: usize>(_)'
|
||||
// @has foo/struct.Bar.html '//pre[@class="rust item-decl"]' 'pub struct Bar<T, const N: usize>('
|
||||
pub struct Bar<T, const N: usize>([T; N]);
|
||||
|
||||
// @has foo/struct.Foo.html '//*[@id="impl-Foo%3CM%3E"]/h3[@class="code-header"]' 'impl<const M: usize> Foo<M>where u8: Trait<M>'
|
||||
|
|
@ -92,7 +92,7 @@ macro_rules! define_me {
|
|||
}
|
||||
|
||||
// @has foo/struct.Foz.html '//pre[@class="rust item-decl"]' \
|
||||
// 'pub struct Foz<const N: usize>(_);'
|
||||
// 'pub struct Foz<const N: usize>(/* private fields */);'
|
||||
define_me!(Foz<N>);
|
||||
|
||||
trait Q {
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@ pub struct S;
|
|||
|
||||
// @has issue_88600/enum.FooEnum.html
|
||||
pub enum FooEnum {
|
||||
// @has - '//*[@id="variant.HiddenTupleItem"]//h3' 'HiddenTupleItem(_)'
|
||||
// @has - '//*[@id="variant.HiddenTupleItem"]//h3' 'HiddenTupleItem(/* private fields */)'
|
||||
// @count - '//*[@id="variant.HiddenTupleItem.field.0"]' 0
|
||||
HiddenTupleItem(#[doc(hidden)] H),
|
||||
// @has - '//*[@id="variant.MultipleHidden"]//h3' 'MultipleHidden(_, _)'
|
||||
// @has - '//*[@id="variant.MultipleHidden"]//h3' 'MultipleHidden(/* private fields */)'
|
||||
// @count - '//*[@id="variant.MultipleHidden.field.0"]' 0
|
||||
// @count - '//*[@id="variant.MultipleHidden.field.1"]' 0
|
||||
MultipleHidden(#[doc(hidden)] H, #[doc(hidden)] H),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<pre class="rust item-decl"><code>pub struct Simd<T>(_)
|
||||
<pre class="rust item-decl"><code>pub struct Simd<T>(/* private fields */)
|
||||
<span class="where">where
|
||||
T: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code></pre>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<code>pub struct Alpha<A>(_)
|
||||
<code>pub struct Alpha<A>(/* private fields */)
|
||||
<span class="where">where
|
||||
A: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code>
|
||||
|
|
@ -4,7 +4,7 @@ use std::io::Lines;
|
|||
|
||||
pub trait MyTrait { fn dummy(&self) { } }
|
||||
|
||||
// @has foo/struct.Alpha.html '//pre' "pub struct Alpha<A>(_) where A: MyTrait"
|
||||
// @has foo/struct.Alpha.html '//pre' "pub struct Alpha<A>(/* private fields */) where A: MyTrait"
|
||||
// @snapshot alpha_trait_decl - '//*[@class="rust item-decl"]/code'
|
||||
pub struct Alpha<A>(A) where A: MyTrait;
|
||||
// @has foo/trait.Bravo.html '//pre' "pub trait Bravo<B>where B: MyTrait"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue