rust/tests/rustdoc-json/enums/discriminant/limits.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.9 KiB
Rust
Raw Normal View History

2022-09-03 13:36:28 -05:00
// ignore-tidy-linelength
#![feature(repr128)]
#![allow(incomplete_features)]
#[repr(u64)]
pub enum U64 {
//@ is "$.index[*][?(@.name=='U64Min')].inner.variant.discriminant.value" '"0"'
//@ is "$.index[*][?(@.name=='U64Min')].inner.variant.discriminant.expr" '"u64::MIN"'
2022-09-03 13:36:28 -05:00
U64Min = u64::MIN,
//@ is "$.index[*][?(@.name=='U64Max')].inner.variant.discriminant.value" '"18446744073709551615"'
//@ is "$.index[*][?(@.name=='U64Max')].inner.variant.discriminant.expr" '"u64::MAX"'
2022-09-03 13:36:28 -05:00
U64Max = u64::MAX,
}
#[repr(i64)]
pub enum I64 {
//@ is "$.index[*][?(@.name=='I64Min')].inner.variant.discriminant.value" '"-9223372036854775808"'
//@ is "$.index[*][?(@.name=='I64Min')].inner.variant.discriminant.expr" '"i64::MIN"'
2022-09-03 13:36:28 -05:00
I64Min = i64::MIN,
//@ is "$.index[*][?(@.name=='I64Max')].inner.variant.discriminant.value" '"9223372036854775807"'
//@ is "$.index[*][?(@.name=='I64Max')].inner.variant.discriminant.expr" '"i64::MAX"'
2022-09-03 13:36:28 -05:00
I64Max = i64::MAX,
}
#[repr(u128)]
pub enum U128 {
//@ is "$.index[*][?(@.name=='U128Min')].inner.variant.discriminant.value" '"0"'
//@ is "$.index[*][?(@.name=='U128Min')].inner.variant.discriminant.expr" '"u128::MIN"'
2022-09-03 13:36:28 -05:00
U128Min = u128::MIN,
//@ is "$.index[*][?(@.name=='U128Max')].inner.variant.discriminant.value" '"340282366920938463463374607431768211455"'
//@ is "$.index[*][?(@.name=='U128Max')].inner.variant.discriminant.expr" '"u128::MAX"'
2022-09-03 13:36:28 -05:00
U128Max = u128::MAX,
}
#[repr(i128)]
pub enum I128 {
//@ is "$.index[*][?(@.name=='I128Min')].inner.variant.discriminant.value" '"-170141183460469231731687303715884105728"'
//@ is "$.index[*][?(@.name=='I128Min')].inner.variant.discriminant.expr" '"i128::MIN"'
2022-09-03 13:36:28 -05:00
I128Min = i128::MIN,
//@ is "$.index[*][?(@.name=='I128Max')].inner.variant.discriminant.value" '"170141183460469231731687303715884105727"'
//@ is "$.index[*][?(@.name=='I128Max')].inner.variant.discriminant.expr" '"i128::MAX"'
2022-09-03 13:36:28 -05:00
I128Max = i128::MAX,
}