summaryrefslogtreecommitdiffstats
path: root/src/test/rustdoc-json/enums/discriminant
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/rustdoc-json/enums/discriminant
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/rustdoc-json/enums/discriminant')
-rw-r--r--src/test/rustdoc-json/enums/discriminant/basic.rs12
-rw-r--r--src/test/rustdoc-json/enums/discriminant/expr.rs39
-rw-r--r--src/test/rustdoc-json/enums/discriminant/limits.rs43
-rw-r--r--src/test/rustdoc-json/enums/discriminant/num_underscore_and_suffix.rs15
-rw-r--r--src/test/rustdoc-json/enums/discriminant/only_some_have_discriminant.rs10
5 files changed, 0 insertions, 119 deletions
diff --git a/src/test/rustdoc-json/enums/discriminant/basic.rs b/src/test/rustdoc-json/enums/discriminant/basic.rs
deleted file mode 100644
index 8c221615a..000000000
--- a/src/test/rustdoc-json/enums/discriminant/basic.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-#[repr(i8)]
-pub enum Ordering {
- // @is "$.index[*][?(@.name=='Less')].inner.variant_inner.expr" '"-1"'
- // @is "$.index[*][?(@.name=='Less')].inner.variant_inner.value" '"-1"'
- Less = -1,
- // @is "$.index[*][?(@.name=='Equal')].inner.variant_inner.expr" '"0"'
- // @is "$.index[*][?(@.name=='Equal')].inner.variant_inner.value" '"0"'
- Equal = 0,
- // @is "$.index[*][?(@.name=='Greater')].inner.variant_inner.expr" '"1"'
- // @is "$.index[*][?(@.name=='Greater')].inner.variant_inner.value" '"1"'
- Greater = 1,
-}
diff --git a/src/test/rustdoc-json/enums/discriminant/expr.rs b/src/test/rustdoc-json/enums/discriminant/expr.rs
deleted file mode 100644
index 235b0b473..000000000
--- a/src/test/rustdoc-json/enums/discriminant/expr.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-pub enum Foo {
- // @is "$.index[*][?(@.name=='Addition')].inner.variant_inner.value" '"0"'
- // @is "$.index[*][?(@.name=='Addition')].inner.variant_inner.expr" '"{ _ }"'
- Addition = 0 + 0,
- // @is "$.index[*][?(@.name=='Bin')].inner.variant_inner.value" '"1"'
- // @is "$.index[*][?(@.name=='Bin')].inner.variant_inner.expr" '"0b1"'
- Bin = 0b1,
- // @is "$.index[*][?(@.name=='Oct')].inner.variant_inner.value" '"2"'
- // @is "$.index[*][?(@.name=='Oct')].inner.variant_inner.expr" '"0o2"'
- Oct = 0o2,
- // @is "$.index[*][?(@.name=='PubConst')].inner.variant_inner.value" '"3"'
- // @is "$.index[*][?(@.name=='PubConst')].inner.variant_inner.expr" '"THREE"'
- PubConst = THREE,
- // @is "$.index[*][?(@.name=='Hex')].inner.variant_inner.value" '"4"'
- // @is "$.index[*][?(@.name=='Hex')].inner.variant_inner.expr" '"0x4"'
- Hex = 0x4,
- // @is "$.index[*][?(@.name=='Cast')].inner.variant_inner.value" '"5"'
- // @is "$.index[*][?(@.name=='Cast')].inner.variant_inner.expr" '"{ _ }"'
- Cast = 5 as isize,
- // @is "$.index[*][?(@.name=='PubCall')].inner.variant_inner.value" '"6"'
- // @is "$.index[*][?(@.name=='PubCall')].inner.variant_inner.expr" '"{ _ }"'
- PubCall = six(),
- // @is "$.index[*][?(@.name=='PrivCall')].inner.variant_inner.value" '"7"'
- // @is "$.index[*][?(@.name=='PrivCall')].inner.variant_inner.expr" '"{ _ }"'
- PrivCall = seven(),
- // @is "$.index[*][?(@.name=='PrivConst')].inner.variant_inner.value" '"8"'
- // @is "$.index[*][?(@.name=='PrivConst')].inner.variant_inner.expr" '"EIGHT"'
- PrivConst = EIGHT,
-}
-
-pub const THREE: isize = 3;
-const EIGHT: isize = 8;
-
-pub const fn six() -> isize {
- 6
-}
-const fn seven() -> isize {
- 7
-}
diff --git a/src/test/rustdoc-json/enums/discriminant/limits.rs b/src/test/rustdoc-json/enums/discriminant/limits.rs
deleted file mode 100644
index 8df73d78d..000000000
--- a/src/test/rustdoc-json/enums/discriminant/limits.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-// ignore-tidy-linelength
-#![feature(repr128)]
-#![allow(incomplete_features)]
-
-#[repr(u64)]
-pub enum U64 {
- // @is "$.index[*][?(@.name=='U64Min')].inner.variant_inner.value" '"0"'
- // @is "$.index[*][?(@.name=='U64Min')].inner.variant_inner.expr" '"u64::MIN"'
- U64Min = u64::MIN,
- // @is "$.index[*][?(@.name=='U64Max')].inner.variant_inner.value" '"18446744073709551615"'
- // @is "$.index[*][?(@.name=='U64Max')].inner.variant_inner.expr" '"u64::MAX"'
- U64Max = u64::MAX,
-}
-
-#[repr(i64)]
-pub enum I64 {
- // @is "$.index[*][?(@.name=='I64Min')].inner.variant_inner.value" '"-9223372036854775808"'
- // @is "$.index[*][?(@.name=='I64Min')].inner.variant_inner.expr" '"i64::MIN"'
- I64Min = i64::MIN,
- // @is "$.index[*][?(@.name=='I64Max')].inner.variant_inner.value" '"9223372036854775807"'
- // @is "$.index[*][?(@.name=='I64Max')].inner.variant_inner.expr" '"i64::MAX"'
- I64Max = i64::MAX,
-}
-
-#[repr(u128)]
-pub enum U128 {
- // @is "$.index[*][?(@.name=='U128Min')].inner.variant_inner.value" '"0"'
- // @is "$.index[*][?(@.name=='U128Min')].inner.variant_inner.expr" '"u128::MIN"'
- U128Min = u128::MIN,
- // @is "$.index[*][?(@.name=='U128Max')].inner.variant_inner.value" '"340282366920938463463374607431768211455"'
- // @is "$.index[*][?(@.name=='U128Max')].inner.variant_inner.expr" '"u128::MAX"'
- U128Max = u128::MAX,
-}
-
-#[repr(i128)]
-pub enum I128 {
- // @is "$.index[*][?(@.name=='I128Min')].inner.variant_inner.value" '"-170141183460469231731687303715884105728"'
- // @is "$.index[*][?(@.name=='I128Min')].inner.variant_inner.expr" '"i128::MIN"'
- I128Min = i128::MIN,
- // @is "$.index[*][?(@.name=='I128Max')].inner.variant_inner.value" '"170141183460469231731687303715884105727"'
- // @is "$.index[*][?(@.name=='I128Max')].inner.variant_inner.expr" '"i128::MAX"'
- I128Max = i128::MAX,
-}
diff --git a/src/test/rustdoc-json/enums/discriminant/num_underscore_and_suffix.rs b/src/test/rustdoc-json/enums/discriminant/num_underscore_and_suffix.rs
deleted file mode 100644
index 3417baa07..000000000
--- a/src/test/rustdoc-json/enums/discriminant/num_underscore_and_suffix.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-#[repr(u32)]
-pub enum Foo {
- // @is "$.index[*][?(@.name=='Basic')].inner.variant_inner.value" '"0"'
- // @is "$.index[*][?(@.name=='Basic')].inner.variant_inner.expr" '"0"'
- Basic = 0,
- // @is "$.index[*][?(@.name=='Suffix')].inner.variant_inner.value" '"10"'
- // @is "$.index[*][?(@.name=='Suffix')].inner.variant_inner.expr" '"10u32"'
- Suffix = 10u32,
- // @is "$.index[*][?(@.name=='Underscore')].inner.variant_inner.value" '"100"'
- // @is "$.index[*][?(@.name=='Underscore')].inner.variant_inner.expr" '"1_0_0"'
- Underscore = 1_0_0,
- // @is "$.index[*][?(@.name=='SuffixUnderscore')].inner.variant_inner.value" '"1000"'
- // @is "$.index[*][?(@.name=='SuffixUnderscore')].inner.variant_inner.expr" '"1_0_0_0u32"'
- SuffixUnderscore = 1_0_0_0u32,
-}
diff --git a/src/test/rustdoc-json/enums/discriminant/only_some_have_discriminant.rs b/src/test/rustdoc-json/enums/discriminant/only_some_have_discriminant.rs
deleted file mode 100644
index 6af944a22..000000000
--- a/src/test/rustdoc-json/enums/discriminant/only_some_have_discriminant.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-pub enum Foo {
- // @is "$.index[*][?(@.name=='Has')].inner.variant_inner" '{"expr":"0", "value":"0"}'
- Has = 0,
- // @is "$.index[*][?(@.name=='Doesnt')].inner.variant_inner" null
- Doesnt,
- // @is "$.index[*][?(@.name=='AlsoDoesnt')].inner.variant_inner" null
- AlsoDoesnt,
- // @is "$.index[*][?(@.name=='AlsoHas')].inner.variant_inner" '{"expr":"44", "value":"44"}'
- AlsoHas = 44,
-}