diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/empty-allocation-non-null.rs (renamed from src/test/ui/empty-allocation-non-null.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty-allocation-rvalue-non-null.rs (renamed from src/test/ui/empty-allocation-rvalue-non-null.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty-type-parameter-list.rs (renamed from src/test/ui/empty-type-parameter-list.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/auxiliary/empty-struct.rs (renamed from src/test/ui/empty/auxiliary/empty-struct.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/auxiliary/two_macros.rs (renamed from src/test/ui/empty/auxiliary/two_macros.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-attributes.rs (renamed from src/test/ui/empty/empty-attributes.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-attributes.stderr (renamed from src/test/ui/empty/empty-attributes.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-comment.rs (renamed from src/test/ui/empty/empty-comment.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-comment.stderr (renamed from src/test/ui/empty/empty-comment.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-linkname.rs (renamed from src/test/ui/empty/empty-linkname.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-linkname.stderr (renamed from src/test/ui/empty/empty-linkname.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-macro-use.rs (renamed from src/test/ui/empty/empty-macro-use.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-macro-use.stderr (renamed from src/test/ui/empty/empty-macro-use.stderr) | 2 | ||||
-rw-r--r-- | tests/ui/empty/empty-never-array.rs (renamed from src/test/ui/empty/empty-never-array.rs) | 3 | ||||
-rw-r--r-- | tests/ui/empty/empty-never-array.stderr | 24 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-braces-expr.rs (renamed from src/test/ui/empty/empty-struct-braces-expr.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-braces-expr.stderr (renamed from src/test/ui/empty/empty-struct-braces-expr.stderr) | 8 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-braces-pat-1.rs (renamed from src/test/ui/empty/empty-struct-braces-pat-1.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-braces-pat-1.stderr (renamed from src/test/ui/empty/empty-struct-braces-pat-1.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-braces-pat-2.rs (renamed from src/test/ui/empty/empty-struct-braces-pat-2.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-braces-pat-2.stderr (renamed from src/test/ui/empty/empty-struct-braces-pat-2.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-braces-pat-3.rs (renamed from src/test/ui/empty/empty-struct-braces-pat-3.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-braces-pat-3.stderr (renamed from src/test/ui/empty/empty-struct-braces-pat-3.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-tuple-pat.rs (renamed from src/test/ui/empty/empty-struct-tuple-pat.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-tuple-pat.stderr (renamed from src/test/ui/empty/empty-struct-tuple-pat.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-unit-expr.rs (renamed from src/test/ui/empty/empty-struct-unit-expr.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-unit-expr.stderr (renamed from src/test/ui/empty/empty-struct-unit-expr.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-unit-pat.rs (renamed from src/test/ui/empty/empty-struct-unit-pat.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/empty-struct-unit-pat.stderr (renamed from src/test/ui/empty/empty-struct-unit-pat.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/empty/issue-37026.rs (renamed from src/test/ui/empty/issue-37026.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty/issue-37026.stderr (renamed from src/test/ui/empty/issue-37026.stderr) | 0 | ||||
-rw-r--r-- | tests/ui/empty/no-link.rs (renamed from src/test/ui/empty/no-link.rs) | 0 | ||||
-rw-r--r-- | tests/ui/empty_global_asm.rs (renamed from src/test/ui/empty_global_asm.rs) | 0 |
33 files changed, 31 insertions, 6 deletions
diff --git a/src/test/ui/empty-allocation-non-null.rs b/tests/ui/empty-allocation-non-null.rs index 925bddd5e..925bddd5e 100644 --- a/src/test/ui/empty-allocation-non-null.rs +++ b/tests/ui/empty-allocation-non-null.rs diff --git a/src/test/ui/empty-allocation-rvalue-non-null.rs b/tests/ui/empty-allocation-rvalue-non-null.rs index 2f5a5c4bb..2f5a5c4bb 100644 --- a/src/test/ui/empty-allocation-rvalue-non-null.rs +++ b/tests/ui/empty-allocation-rvalue-non-null.rs diff --git a/src/test/ui/empty-type-parameter-list.rs b/tests/ui/empty-type-parameter-list.rs index e168cd03b..e168cd03b 100644 --- a/src/test/ui/empty-type-parameter-list.rs +++ b/tests/ui/empty-type-parameter-list.rs diff --git a/src/test/ui/empty/auxiliary/empty-struct.rs b/tests/ui/empty/auxiliary/empty-struct.rs index 3fb40f6bf..3fb40f6bf 100644 --- a/src/test/ui/empty/auxiliary/empty-struct.rs +++ b/tests/ui/empty/auxiliary/empty-struct.rs diff --git a/src/test/ui/empty/auxiliary/two_macros.rs b/tests/ui/empty/auxiliary/two_macros.rs index 2330c75c8..2330c75c8 100644 --- a/src/test/ui/empty/auxiliary/two_macros.rs +++ b/tests/ui/empty/auxiliary/two_macros.rs diff --git a/src/test/ui/empty/empty-attributes.rs b/tests/ui/empty/empty-attributes.rs index d319227b2..d319227b2 100644 --- a/src/test/ui/empty/empty-attributes.rs +++ b/tests/ui/empty/empty-attributes.rs diff --git a/src/test/ui/empty/empty-attributes.stderr b/tests/ui/empty/empty-attributes.stderr index 01d0d5a6b..01d0d5a6b 100644 --- a/src/test/ui/empty/empty-attributes.stderr +++ b/tests/ui/empty/empty-attributes.stderr diff --git a/src/test/ui/empty/empty-comment.rs b/tests/ui/empty/empty-comment.rs index 174274d28..174274d28 100644 --- a/src/test/ui/empty/empty-comment.rs +++ b/tests/ui/empty/empty-comment.rs diff --git a/src/test/ui/empty/empty-comment.stderr b/tests/ui/empty/empty-comment.stderr index 7cc8d8fe9..7cc8d8fe9 100644 --- a/src/test/ui/empty/empty-comment.stderr +++ b/tests/ui/empty/empty-comment.stderr diff --git a/src/test/ui/empty/empty-linkname.rs b/tests/ui/empty/empty-linkname.rs index 7113d913c..7113d913c 100644 --- a/src/test/ui/empty/empty-linkname.rs +++ b/tests/ui/empty/empty-linkname.rs diff --git a/src/test/ui/empty/empty-linkname.stderr b/tests/ui/empty/empty-linkname.stderr index adcf3670d..adcf3670d 100644 --- a/src/test/ui/empty/empty-linkname.stderr +++ b/tests/ui/empty/empty-linkname.stderr diff --git a/src/test/ui/empty/empty-macro-use.rs b/tests/ui/empty/empty-macro-use.rs index 846004e66..846004e66 100644 --- a/src/test/ui/empty/empty-macro-use.rs +++ b/tests/ui/empty/empty-macro-use.rs diff --git a/src/test/ui/empty/empty-macro-use.stderr b/tests/ui/empty/empty-macro-use.stderr index 700f6616a..e0b3b8685 100644 --- a/src/test/ui/empty/empty-macro-use.stderr +++ b/tests/ui/empty/empty-macro-use.stderr @@ -4,7 +4,7 @@ error: cannot find macro `macro_two` in this scope LL | macro_two!(); | ^^^^^^^^^ | - = note: consider importing this macro: + = help: consider importing this macro: two_macros::macro_two error: aborting due to previous error diff --git a/src/test/ui/empty/empty-never-array.rs b/tests/ui/empty/empty-never-array.rs index 3de2b1a78..fd9334610 100644 --- a/src/test/ui/empty/empty-never-array.rs +++ b/tests/ui/empty/empty-never-array.rs @@ -8,7 +8,8 @@ enum Helper<T, U> { fn transmute<T, U>(t: T) -> U { let Helper::U(u) = Helper::T(t, []); - //~^ ERROR refutable pattern in local binding: `Helper::T(_, _)` not covered + //~^ ERROR refutable pattern in local binding + //~| `Helper::T(_, _)` not covered u } diff --git a/tests/ui/empty/empty-never-array.stderr b/tests/ui/empty/empty-never-array.stderr new file mode 100644 index 000000000..a488e484b --- /dev/null +++ b/tests/ui/empty/empty-never-array.stderr @@ -0,0 +1,24 @@ +error[E0005]: refutable pattern in local binding + --> $DIR/empty-never-array.rs:10:9 + | +LL | let Helper::U(u) = Helper::T(t, []); + | ^^^^^^^^^^^^ pattern `Helper::T(_, _)` not covered + | + = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant + = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html +note: `Helper<T, U>` defined here + --> $DIR/empty-never-array.rs:3:6 + | +LL | enum Helper<T, U> { + | ^^^^^^ +LL | T(T, [!; 0]), + | - not covered + = note: the matched value is of type `Helper<T, U>` +help: you might want to use `let else` to handle the variant that isn't matched + | +LL | let Helper::U(u) = Helper::T(t, []) else { todo!() }; + | ++++++++++++++++ + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0005`. diff --git a/src/test/ui/empty/empty-struct-braces-expr.rs b/tests/ui/empty/empty-struct-braces-expr.rs index 2aab3e777..2aab3e777 100644 --- a/src/test/ui/empty/empty-struct-braces-expr.rs +++ b/tests/ui/empty/empty-struct-braces-expr.rs diff --git a/src/test/ui/empty/empty-struct-braces-expr.stderr b/tests/ui/empty/empty-struct-braces-expr.stderr index e1a7a02a5..0e580aede 100644 --- a/src/test/ui/empty/empty-struct-braces-expr.stderr +++ b/tests/ui/empty/empty-struct-braces-expr.stderr @@ -100,22 +100,22 @@ help: a unit struct with a similar name exists LL | let xe1 = XEmpty2(); | ~~~~~~~ -error[E0599]: no variant or associated item named `Empty3` found for enum `empty_struct::XE` in the current scope +error[E0599]: no variant or associated item named `Empty3` found for enum `XE` in the current scope --> $DIR/empty-struct-braces-expr.rs:25:19 | LL | let xe3 = XE::Empty3; | ^^^^^^ | | - | variant or associated item not found in `empty_struct::XE` + | variant or associated item not found in `XE` | help: there is a variant with a similar name: `XEmpty3` -error[E0599]: no variant or associated item named `Empty3` found for enum `empty_struct::XE` in the current scope +error[E0599]: no variant or associated item named `Empty3` found for enum `XE` in the current scope --> $DIR/empty-struct-braces-expr.rs:26:19 | LL | let xe3 = XE::Empty3(); | ^^^^^^ | | - | variant or associated item not found in `empty_struct::XE` + | variant or associated item not found in `XE` | help: there is a variant with a similar name: `XEmpty3` error[E0599]: no variant named `Empty1` found for enum `empty_struct::XE` diff --git a/src/test/ui/empty/empty-struct-braces-pat-1.rs b/tests/ui/empty/empty-struct-braces-pat-1.rs index 9bed93f9c..9bed93f9c 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-1.rs +++ b/tests/ui/empty/empty-struct-braces-pat-1.rs diff --git a/src/test/ui/empty/empty-struct-braces-pat-1.stderr b/tests/ui/empty/empty-struct-braces-pat-1.stderr index 14e09fc27..14e09fc27 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-1.stderr +++ b/tests/ui/empty/empty-struct-braces-pat-1.stderr diff --git a/src/test/ui/empty/empty-struct-braces-pat-2.rs b/tests/ui/empty/empty-struct-braces-pat-2.rs index cfe4641f3..cfe4641f3 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-2.rs +++ b/tests/ui/empty/empty-struct-braces-pat-2.rs diff --git a/src/test/ui/empty/empty-struct-braces-pat-2.stderr b/tests/ui/empty/empty-struct-braces-pat-2.stderr index 7fb5cb203..7fb5cb203 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-2.stderr +++ b/tests/ui/empty/empty-struct-braces-pat-2.stderr diff --git a/src/test/ui/empty/empty-struct-braces-pat-3.rs b/tests/ui/empty/empty-struct-braces-pat-3.rs index 54d547eef..54d547eef 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-3.rs +++ b/tests/ui/empty/empty-struct-braces-pat-3.rs diff --git a/src/test/ui/empty/empty-struct-braces-pat-3.stderr b/tests/ui/empty/empty-struct-braces-pat-3.stderr index 00c8b12e6..00c8b12e6 100644 --- a/src/test/ui/empty/empty-struct-braces-pat-3.stderr +++ b/tests/ui/empty/empty-struct-braces-pat-3.stderr diff --git a/src/test/ui/empty/empty-struct-tuple-pat.rs b/tests/ui/empty/empty-struct-tuple-pat.rs index 47da8a306..47da8a306 100644 --- a/src/test/ui/empty/empty-struct-tuple-pat.rs +++ b/tests/ui/empty/empty-struct-tuple-pat.rs diff --git a/src/test/ui/empty/empty-struct-tuple-pat.stderr b/tests/ui/empty/empty-struct-tuple-pat.stderr index 8d0f75d20..8d0f75d20 100644 --- a/src/test/ui/empty/empty-struct-tuple-pat.stderr +++ b/tests/ui/empty/empty-struct-tuple-pat.stderr diff --git a/src/test/ui/empty/empty-struct-unit-expr.rs b/tests/ui/empty/empty-struct-unit-expr.rs index 8f3688a2a..8f3688a2a 100644 --- a/src/test/ui/empty/empty-struct-unit-expr.rs +++ b/tests/ui/empty/empty-struct-unit-expr.rs diff --git a/src/test/ui/empty/empty-struct-unit-expr.stderr b/tests/ui/empty/empty-struct-unit-expr.stderr index e97209527..e97209527 100644 --- a/src/test/ui/empty/empty-struct-unit-expr.stderr +++ b/tests/ui/empty/empty-struct-unit-expr.stderr diff --git a/src/test/ui/empty/empty-struct-unit-pat.rs b/tests/ui/empty/empty-struct-unit-pat.rs index 44a1e9e3d..44a1e9e3d 100644 --- a/src/test/ui/empty/empty-struct-unit-pat.rs +++ b/tests/ui/empty/empty-struct-unit-pat.rs diff --git a/src/test/ui/empty/empty-struct-unit-pat.stderr b/tests/ui/empty/empty-struct-unit-pat.stderr index 5c0b4cffa..5c0b4cffa 100644 --- a/src/test/ui/empty/empty-struct-unit-pat.stderr +++ b/tests/ui/empty/empty-struct-unit-pat.stderr diff --git a/src/test/ui/empty/issue-37026.rs b/tests/ui/empty/issue-37026.rs index fd678a717..fd678a717 100644 --- a/src/test/ui/empty/issue-37026.rs +++ b/tests/ui/empty/issue-37026.rs diff --git a/src/test/ui/empty/issue-37026.stderr b/tests/ui/empty/issue-37026.stderr index 48a4a5bca..48a4a5bca 100644 --- a/src/test/ui/empty/issue-37026.stderr +++ b/tests/ui/empty/issue-37026.stderr diff --git a/src/test/ui/empty/no-link.rs b/tests/ui/empty/no-link.rs index c80e61b45..c80e61b45 100644 --- a/src/test/ui/empty/no-link.rs +++ b/tests/ui/empty/no-link.rs diff --git a/src/test/ui/empty_global_asm.rs b/tests/ui/empty_global_asm.rs index af13762d1..af13762d1 100644 --- a/src/test/ui/empty_global_asm.rs +++ b/tests/ui/empty_global_asm.rs |