diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-07-04 11:24:56 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-07-04 21:01:35 -0400 |
| commit | 007d87f1719e2fcf2ff36aef8b6dc866fa276386 (patch) | |
| tree | d9c63e11e69641b1dfa286b92bcd6771a8caf15b /src/test/ui | |
| parent | 8a7dded1a249a21540583333204c378bf960a700 (diff) | |
| download | rust-007d87f1719e2fcf2ff36aef8b6dc866fa276386.tar.gz rust-007d87f1719e2fcf2ff36aef8b6dc866fa276386.zip | |
Permit use of mem::uninitialized via allow(deprecated)
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/const-generics/issue-61422.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-48131.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/issues/issue-48131.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/uninhabited/uninhabited-matches-feature-gated.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr | 14 |
5 files changed, 13 insertions, 9 deletions
diff --git a/src/test/ui/const-generics/issue-61422.rs b/src/test/ui/const-generics/issue-61422.rs index 3ccf38e5619..68e5a52e0ac 100644 --- a/src/test/ui/const-generics/issue-61422.rs +++ b/src/test/ui/const-generics/issue-61422.rs @@ -7,6 +7,7 @@ use std::mem; fn foo<const SIZE: usize>() { let arr: [u8; SIZE] = unsafe { + #[allow(deprecated)] let mut array: [u8; SIZE] = mem::uninitialized(); array }; diff --git a/src/test/ui/issues/issue-48131.rs b/src/test/ui/issues/issue-48131.rs index b3cc350acf5..c8540729352 100644 --- a/src/test/ui/issues/issue-48131.rs +++ b/src/test/ui/issues/issue-48131.rs @@ -1,6 +1,7 @@ // This note is annotated because the purpose of the test // is to ensure that certain other notes are not generated. #![deny(unused_unsafe)] //~ NOTE +#![allow(deprecated)] // (test that no note is generated on this unsafe fn) pub unsafe fn a() { diff --git a/src/test/ui/issues/issue-48131.stderr b/src/test/ui/issues/issue-48131.stderr index adc36e266c2..6df065b9807 100644 --- a/src/test/ui/issues/issue-48131.stderr +++ b/src/test/ui/issues/issue-48131.stderr @@ -1,5 +1,5 @@ error: unnecessary `unsafe` block - --> $DIR/issue-48131.rs:8:9 + --> $DIR/issue-48131.rs:9:9 | LL | unsafe { /* unnecessary */ } | ^^^^^^ unnecessary `unsafe` block @@ -11,7 +11,7 @@ LL | #![deny(unused_unsafe)] | ^^^^^^^^^^^^^ error: unnecessary `unsafe` block - --> $DIR/issue-48131.rs:19:13 + --> $DIR/issue-48131.rs:20:13 | LL | unsafe { /* unnecessary */ } | ^^^^^^ unnecessary `unsafe` block diff --git a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.rs b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.rs index 38a52d5860d..a5360fa13c4 100644 --- a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.rs +++ b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.rs @@ -1,3 +1,5 @@ +#![allow(deprecated)] + enum Void {} fn main() { diff --git a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr index de7a9635770..25519ab2d6a 100644 --- a/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr +++ b/src/test/ui/uninhabited/uninhabited-matches-feature-gated.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: `Err(_)` not covered - --> $DIR/uninhabited-matches-feature-gated.rs:5:19 + --> $DIR/uninhabited-matches-feature-gated.rs:7:19 | LL | let _ = match x { | ^ pattern `Err(_)` not covered @@ -7,7 +7,7 @@ LL | let _ = match x { = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: type `&Void` is non-empty - --> $DIR/uninhabited-matches-feature-gated.rs:10:19 + --> $DIR/uninhabited-matches-feature-gated.rs:12:19 | LL | let _ = match x {}; | ^ @@ -15,7 +15,7 @@ LL | let _ = match x {}; = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: type `(Void,)` is non-empty - --> $DIR/uninhabited-matches-feature-gated.rs:13:19 + --> $DIR/uninhabited-matches-feature-gated.rs:15:19 | LL | let _ = match x {}; | ^ @@ -23,7 +23,7 @@ LL | let _ = match x {}; = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: type `[Void; 1]` is non-empty - --> $DIR/uninhabited-matches-feature-gated.rs:16:19 + --> $DIR/uninhabited-matches-feature-gated.rs:18:19 | LL | let _ = match x {}; | ^ @@ -31,7 +31,7 @@ LL | let _ = match x {}; = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: `&[_]` not covered - --> $DIR/uninhabited-matches-feature-gated.rs:19:19 + --> $DIR/uninhabited-matches-feature-gated.rs:21:19 | LL | let _ = match x { | ^ pattern `&[_]` not covered @@ -39,7 +39,7 @@ LL | let _ = match x { = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0004]: non-exhaustive patterns: `Err(_)` not covered - --> $DIR/uninhabited-matches-feature-gated.rs:27:19 + --> $DIR/uninhabited-matches-feature-gated.rs:29:19 | LL | let _ = match x { | ^ pattern `Err(_)` not covered @@ -47,7 +47,7 @@ LL | let _ = match x { = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms error[E0005]: refutable pattern in local binding: `Err(_)` not covered - --> $DIR/uninhabited-matches-feature-gated.rs:32:9 + --> $DIR/uninhabited-matches-feature-gated.rs:34:9 | LL | let Ok(x) = x; | ^^^^^ pattern `Err(_)` not covered |
