2021-04-12 14:14:41 -05:00
|
|
|
#![allow(unused)]
|
|
|
|
|
2021-05-23 10:09:39 -05:00
|
|
|
// @has 'toggle_item_contents/struct.PubStruct.html'
|
2023-01-10 12:35:37 -06:00
|
|
|
// @count - '//details[@class="toggle type-contents-toggle"]' 0
|
2021-04-12 14:14:41 -05:00
|
|
|
pub struct PubStruct {
|
|
|
|
pub a: usize,
|
|
|
|
pub b: usize,
|
|
|
|
}
|
|
|
|
|
2021-05-23 10:09:39 -05:00
|
|
|
// @has 'toggle_item_contents/struct.BigPubStruct.html'
|
2023-01-10 12:35:37 -06:00
|
|
|
// @count - '//details[@class="toggle type-contents-toggle"]' 1
|
|
|
|
// @has - '//details[@class="toggle type-contents-toggle"]' 'Show 13 fields'
|
2021-04-12 14:14:41 -05:00
|
|
|
pub struct BigPubStruct {
|
|
|
|
pub a: usize,
|
|
|
|
pub b: usize,
|
|
|
|
pub c: usize,
|
|
|
|
pub d: usize,
|
|
|
|
pub e: usize,
|
|
|
|
pub f: usize,
|
|
|
|
pub g: usize,
|
|
|
|
pub h: usize,
|
|
|
|
pub i: usize,
|
|
|
|
pub j: usize,
|
|
|
|
pub k: usize,
|
|
|
|
pub l: usize,
|
|
|
|
pub m: usize,
|
|
|
|
}
|
|
|
|
|
2021-05-23 10:09:39 -05:00
|
|
|
// @has 'toggle_item_contents/union.BigUnion.html'
|
2023-01-10 12:35:37 -06:00
|
|
|
// @count - '//details[@class="toggle type-contents-toggle"]' 1
|
|
|
|
// @has - '//details[@class="toggle type-contents-toggle"]' 'Show 13 fields'
|
2021-04-12 14:14:41 -05:00
|
|
|
pub union BigUnion {
|
|
|
|
pub a: usize,
|
|
|
|
pub b: usize,
|
|
|
|
pub c: usize,
|
|
|
|
pub d: usize,
|
|
|
|
pub e: usize,
|
|
|
|
pub f: usize,
|
|
|
|
pub g: usize,
|
|
|
|
pub h: usize,
|
|
|
|
pub i: usize,
|
|
|
|
pub j: usize,
|
|
|
|
pub k: usize,
|
|
|
|
pub l: usize,
|
|
|
|
pub m: usize,
|
|
|
|
}
|
|
|
|
|
2021-05-23 10:09:39 -05:00
|
|
|
// @has 'toggle_item_contents/union.Union.html'
|
2023-01-10 12:35:37 -06:00
|
|
|
// @count - '//details[@class="toggle type-contents-toggle"]' 0
|
2021-04-12 14:14:41 -05:00
|
|
|
pub union Union {
|
|
|
|
pub a: usize,
|
|
|
|
pub b: usize,
|
|
|
|
pub c: usize,
|
|
|
|
}
|
|
|
|
|
2021-05-23 10:09:39 -05:00
|
|
|
// @has 'toggle_item_contents/struct.PrivStruct.html'
|
2023-01-10 12:35:37 -06:00
|
|
|
// @count - '//details[@class="toggle type-contents-toggle"]' 0
|
2023-01-30 12:05:12 -06:00
|
|
|
// @has - '//pre[@class="rust item-decl"]' '/* private fields */'
|
2021-04-12 14:14:41 -05:00
|
|
|
pub struct PrivStruct {
|
|
|
|
a: usize,
|
|
|
|
b: usize,
|
|
|
|
}
|
|
|
|
|
2021-05-23 10:09:39 -05:00
|
|
|
// @has 'toggle_item_contents/enum.Enum.html'
|
2023-01-10 12:35:37 -06:00
|
|
|
// @!has - '//details[@class="toggle type-contents-toggle"]' ''
|
2021-04-12 14:14:41 -05:00
|
|
|
pub enum Enum {
|
|
|
|
A, B, C,
|
|
|
|
D {
|
|
|
|
a: u8,
|
|
|
|
b: u8
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-10 21:42:21 -05:00
|
|
|
// @has 'toggle_item_contents/enum.EnumStructVariant.html'
|
2023-01-10 12:35:37 -06:00
|
|
|
// @!has - '//details[@class="toggle type-contents-toggle"]' ''
|
2021-07-10 21:42:21 -05:00
|
|
|
pub enum EnumStructVariant {
|
|
|
|
A, B, C,
|
|
|
|
D {
|
|
|
|
a: u8,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-23 10:09:39 -05:00
|
|
|
// @has 'toggle_item_contents/enum.LargeEnum.html'
|
2023-01-30 12:05:12 -06:00
|
|
|
// @count - '//pre[@class="rust item-decl"]//details[@class="toggle type-contents-toggle"]' 1
|
|
|
|
// @has - '//pre[@class="rust item-decl"]//details[@class="toggle type-contents-toggle"]' 'Show 13 variants'
|
2021-04-12 14:14:41 -05:00
|
|
|
pub enum LargeEnum {
|
|
|
|
A, B, C, D, E, F(u8), G, H, I, J, K, L, M
|
|
|
|
}
|
|
|
|
|
2021-05-23 10:09:39 -05:00
|
|
|
// @has 'toggle_item_contents/trait.Trait.html'
|
2023-01-10 12:35:37 -06:00
|
|
|
// @count - '//details[@class="toggle type-contents-toggle"]' 0
|
2021-04-12 14:14:41 -05:00
|
|
|
pub trait Trait {
|
|
|
|
type A;
|
|
|
|
#[must_use]
|
|
|
|
fn foo();
|
|
|
|
fn bar();
|
|
|
|
}
|
|
|
|
|
2021-05-23 10:09:39 -05:00
|
|
|
// @has 'toggle_item_contents/trait.GinormousTrait.html'
|
2023-01-10 12:35:37 -06:00
|
|
|
// @count - '//details[@class="toggle type-contents-toggle"]' 1
|
|
|
|
// @has - '//details[@class="toggle type-contents-toggle"]' 'Show 16 associated items'
|
2021-04-12 14:14:41 -05:00
|
|
|
pub trait GinormousTrait {
|
|
|
|
type A;
|
|
|
|
type B;
|
|
|
|
type C;
|
|
|
|
type D;
|
|
|
|
type E;
|
|
|
|
type F;
|
|
|
|
type G;
|
|
|
|
type H;
|
|
|
|
type I;
|
|
|
|
type J;
|
|
|
|
type K;
|
|
|
|
type L;
|
|
|
|
type M;
|
|
|
|
const N: usize = 1;
|
|
|
|
#[must_use]
|
|
|
|
fn foo();
|
|
|
|
fn bar();
|
|
|
|
}
|
|
|
|
|
2021-05-23 10:09:39 -05:00
|
|
|
// @has 'toggle_item_contents/trait.HugeTrait.html'
|
2023-01-10 12:35:37 -06:00
|
|
|
// @count - '//details[@class="toggle type-contents-toggle"]' 1
|
|
|
|
// @has - '//details[@class="toggle type-contents-toggle"]' 'Show 12 associated constants and 2 methods'
|
2021-04-12 14:14:41 -05:00
|
|
|
pub trait HugeTrait {
|
|
|
|
type A;
|
|
|
|
const M: usize = 1;
|
|
|
|
const N: usize = 1;
|
|
|
|
const O: usize = 1;
|
|
|
|
const P: usize = 1;
|
|
|
|
const Q: usize = 1;
|
|
|
|
const R: usize = 1;
|
|
|
|
const S: usize = 1;
|
|
|
|
const T: usize = 1;
|
|
|
|
const U: usize = 1;
|
|
|
|
const V: usize = 1;
|
|
|
|
const W: usize = 1;
|
|
|
|
const X: usize = 1;
|
|
|
|
#[must_use]
|
|
|
|
fn foo();
|
|
|
|
fn bar();
|
|
|
|
}
|
|
|
|
|
2021-07-10 21:42:21 -05:00
|
|
|
// @has 'toggle_item_contents/trait.GiganticTrait.html'
|
2023-01-10 12:35:37 -06:00
|
|
|
// @count - '//details[@class="toggle type-contents-toggle"]' 1
|
|
|
|
// @has - '//details[@class="toggle type-contents-toggle"]' 'Show 1 associated constant and 1 method'
|
2021-07-10 21:42:21 -05:00
|
|
|
pub trait GiganticTrait {
|
|
|
|
type A;
|
|
|
|
type B;
|
|
|
|
type C;
|
|
|
|
type D;
|
|
|
|
type E;
|
|
|
|
type F;
|
|
|
|
type G;
|
|
|
|
type H;
|
|
|
|
type I;
|
|
|
|
type J;
|
|
|
|
type K;
|
|
|
|
type L;
|
|
|
|
const M: usize = 1;
|
|
|
|
#[must_use]
|
|
|
|
fn foo();
|
|
|
|
}
|
|
|
|
|
2021-05-23 10:09:39 -05:00
|
|
|
// @has 'toggle_item_contents/trait.BigTrait.html'
|
2023-01-10 12:35:37 -06:00
|
|
|
// @count - '//details[@class="toggle type-contents-toggle"]' 1
|
|
|
|
// @has - '//details[@class="toggle type-contents-toggle"]' 'Show 14 methods'
|
2021-04-12 14:14:41 -05:00
|
|
|
pub trait BigTrait {
|
|
|
|
type A;
|
|
|
|
#[must_use]
|
|
|
|
fn foo();
|
|
|
|
fn bar();
|
|
|
|
fn baz();
|
|
|
|
fn quux();
|
|
|
|
fn frob();
|
|
|
|
fn greeble();
|
|
|
|
fn blap();
|
|
|
|
fn whoop();
|
|
|
|
fn pow();
|
|
|
|
fn bang();
|
|
|
|
fn oomph();
|
|
|
|
fn argh();
|
|
|
|
fn wap();
|
|
|
|
fn ouch();
|
|
|
|
}
|