Skip to content

Commit

Permalink
Auto merge of #112068 - WaffleLapkin:move-discrim-tests, r=compiler-e…
Browse files Browse the repository at this point in the history
…rrors

Move tests from `ui/discrim` dir

It seems that we already have a `enum-discriminant` with more tests, so it makes sense to merge them.
  • Loading branch information
bors committed Jun 8, 2023
2 parents a77659a + 7b8e8ad commit 8b35c0b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/tools/tidy/src/ui_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::path::{Path, PathBuf};
const ENTRY_LIMIT: usize = 900;
// FIXME: The following limits should be reduced eventually.
const ISSUES_ENTRY_LIMIT: usize = 1898;
const ROOT_ENTRY_LIMIT: usize = 871;
const ROOT_ENTRY_LIMIT: usize = 870;

const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[
"rs", // test source files
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0308]: mismatched types
--> $DIR/discrim-ill-typed.rs:15:16
--> $DIR/discriminant-ill-typed.rs:15:16
|
LL | OhNo = 0_u8,
| ^^^^ expected `i8`, found `u8`
Expand All @@ -10,7 +10,7 @@ LL | OhNo = 0_i8,
| ~~

error[E0308]: mismatched types
--> $DIR/discrim-ill-typed.rs:28:16
--> $DIR/discriminant-ill-typed.rs:28:16
|
LL | OhNo = 0_i8,
| ^^^^ expected `u8`, found `i8`
Expand All @@ -21,7 +21,7 @@ LL | OhNo = 0_u8,
| ~~

error[E0308]: mismatched types
--> $DIR/discrim-ill-typed.rs:41:16
--> $DIR/discriminant-ill-typed.rs:41:16
|
LL | OhNo = 0_u16,
| ^^^^^ expected `i16`, found `u16`
Expand All @@ -32,7 +32,7 @@ LL | OhNo = 0_i16,
| ~~~

error[E0308]: mismatched types
--> $DIR/discrim-ill-typed.rs:54:16
--> $DIR/discriminant-ill-typed.rs:54:16
|
LL | OhNo = 0_i16,
| ^^^^^ expected `u16`, found `i16`
Expand All @@ -43,7 +43,7 @@ LL | OhNo = 0_u16,
| ~~~

error[E0308]: mismatched types
--> $DIR/discrim-ill-typed.rs:67:16
--> $DIR/discriminant-ill-typed.rs:67:16
|
LL | OhNo = 0_u32,
| ^^^^^ expected `i32`, found `u32`
Expand All @@ -54,7 +54,7 @@ LL | OhNo = 0_i32,
| ~~~

error[E0308]: mismatched types
--> $DIR/discrim-ill-typed.rs:80:16
--> $DIR/discriminant-ill-typed.rs:80:16
|
LL | OhNo = 0_i32,
| ^^^^^ expected `u32`, found `i32`
Expand All @@ -65,7 +65,7 @@ LL | OhNo = 0_u32,
| ~~~

error[E0308]: mismatched types
--> $DIR/discrim-ill-typed.rs:93:16
--> $DIR/discriminant-ill-typed.rs:93:16
|
LL | OhNo = 0_u64,
| ^^^^^ expected `i64`, found `u64`
Expand All @@ -76,7 +76,7 @@ LL | OhNo = 0_i64,
| ~~~

error[E0308]: mismatched types
--> $DIR/discrim-ill-typed.rs:106:16
--> $DIR/discriminant-ill-typed.rs:106:16
|
LL | OhNo = 0_i64,
| ^^^^^ expected `u64`, found `i64`
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow.rs:11:9
--> $DIR/discriminant-overflow-2.rs:13:9
|
LL | OhNo,
| ^^^^ overflowed on value after 127
|
= note: explicitly set `OhNo = -128` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow.rs:22:9
--> $DIR/discriminant-overflow-2.rs:22:9
|
LL | OhNo,
| ^^^^ overflowed on value after 255
|
= note: explicitly set `OhNo = 0` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow.rs:33:9
--> $DIR/discriminant-overflow-2.rs:31:9
|
LL | OhNo,
| ^^^^ overflowed on value after 32767
|
= note: explicitly set `OhNo = -32768` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow.rs:44:9
--> $DIR/discriminant-overflow-2.rs:40:9
|
LL | OhNo,
| ^^^^ overflowed on value after 65535
|
= note: explicitly set `OhNo = 0` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow.rs:56:9
--> $DIR/discriminant-overflow-2.rs:49:9
|
LL | OhNo,
| ^^^^ overflowed on value after 2147483647
|
= note: explicitly set `OhNo = -2147483648` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow.rs:68:9
--> $DIR/discriminant-overflow-2.rs:58:9
|
LL | OhNo,
| ^^^^ overflowed on value after 4294967295
|
= note: explicitly set `OhNo = 0` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow.rs:80:9
--> $DIR/discriminant-overflow-2.rs:67:9
|
LL | OhNo,
| ^^^^ overflowed on value after 9223372036854775807
|
= note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow.rs:92:9
--> $DIR/discriminant-overflow-2.rs:76:9
|
LL | OhNo,
| ^^^^ overflowed on value after 18446744073709551615
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow-2.rs:13:9
--> $DIR/discriminant-overflow.rs:11:9
|
LL | OhNo,
| ^^^^ overflowed on value after 127
|
= note: explicitly set `OhNo = -128` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow-2.rs:22:9
--> $DIR/discriminant-overflow.rs:22:9
|
LL | OhNo,
| ^^^^ overflowed on value after 255
|
= note: explicitly set `OhNo = 0` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow-2.rs:31:9
--> $DIR/discriminant-overflow.rs:33:9
|
LL | OhNo,
| ^^^^ overflowed on value after 32767
|
= note: explicitly set `OhNo = -32768` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow-2.rs:40:9
--> $DIR/discriminant-overflow.rs:44:9
|
LL | OhNo,
| ^^^^ overflowed on value after 65535
|
= note: explicitly set `OhNo = 0` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow-2.rs:49:9
--> $DIR/discriminant-overflow.rs:56:9
|
LL | OhNo,
| ^^^^ overflowed on value after 2147483647
|
= note: explicitly set `OhNo = -2147483648` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow-2.rs:58:9
--> $DIR/discriminant-overflow.rs:68:9
|
LL | OhNo,
| ^^^^ overflowed on value after 4294967295
|
= note: explicitly set `OhNo = 0` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow-2.rs:67:9
--> $DIR/discriminant-overflow.rs:80:9
|
LL | OhNo,
| ^^^^ overflowed on value after 9223372036854775807
|
= note: explicitly set `OhNo = -9223372036854775808` if that is desired outcome

error[E0370]: enum discriminant overflowed
--> $DIR/discrim-overflow-2.rs:76:9
--> $DIR/discriminant-overflow.rs:92:9
|
LL | OhNo,
| ^^^^ overflowed on value after 18446744073709551615
Expand Down

0 comments on commit 8b35c0b

Please sign in to comment.