about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-01-29 18:56:26 +0900
committerGitHub <noreply@github.com>2020-01-29 18:56:26 +0900
commit8f1857a822e7aa97337e8026896845d89f7adb47 (patch)
treeb54bb056a70e65d26464a2ca5b3eeadc1b460a6b /src/test
parent36fd7b9a5960a799dbfa41b032094c2b0a22143d (diff)
parent979f5b4b1c5eff3c527662d214678acc2271ba66 (diff)
downloadrust-8f1857a822e7aa97337e8026896845d89f7adb47.tar.gz
rust-8f1857a822e7aa97337e8026896845d89f7adb47.zip
Rollup merge of #68586 - Centril:repr-deny, r=pnkfelix
Make conflicting_repr_hints a deny-by-default c-future-compat lint

Closes https://github.com/rust-lang/rust/issues/68428.
cc https://github.com/rust-lang/rust/issues/68585.

r? @petrochenkov @pnkfelix
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/conflicting-repr-hints.rs2
-rw-r--r--src/test/ui/conflicting-repr-hints.stderr25
-rw-r--r--src/test/ui/feature-gates/feature-gate-repr-simd.rs1
-rw-r--r--src/test/ui/feature-gates/feature-gate-repr-simd.stderr7
-rw-r--r--src/test/ui/issues/issue-47094.rs2
-rw-r--r--src/test/ui/issues/issue-47094.stderr10
6 files changed, 36 insertions, 11 deletions
diff --git a/src/test/ui/conflicting-repr-hints.rs b/src/test/ui/conflicting-repr-hints.rs
index 8e9c11690a8..09dade20992 100644
--- a/src/test/ui/conflicting-repr-hints.rs
+++ b/src/test/ui/conflicting-repr-hints.rs
@@ -11,11 +11,13 @@ enum B {
 }
 
 #[repr(C, u64)] //~ ERROR conflicting representation hints
+//~^ WARN this was previously accepted
 enum C {
     C,
 }
 
 #[repr(u32, u64)] //~ ERROR conflicting representation hints
+//~^ WARN this was previously accepted
 enum D {
     D,
 }
diff --git a/src/test/ui/conflicting-repr-hints.stderr b/src/test/ui/conflicting-repr-hints.stderr
index 0dfe360dbb3..43b76bf6497 100644
--- a/src/test/ui/conflicting-repr-hints.stderr
+++ b/src/test/ui/conflicting-repr-hints.stderr
@@ -3,45 +3,52 @@ error[E0566]: conflicting representation hints
    |
 LL | #[repr(C, u64)]
    |        ^  ^^^
+   |
+   = note: `#[deny(conflicting_repr_hints)]` on by default
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
 
 error[E0566]: conflicting representation hints
-  --> $DIR/conflicting-repr-hints.rs:18:8
+  --> $DIR/conflicting-repr-hints.rs:19:8
    |
 LL | #[repr(u32, u64)]
    |        ^^^  ^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
 
 error[E0587]: type has conflicting packed and align representation hints
-  --> $DIR/conflicting-repr-hints.rs:27:1
+  --> $DIR/conflicting-repr-hints.rs:29:1
    |
 LL | struct F(i32);
    | ^^^^^^^^^^^^^^
 
 error[E0587]: type has conflicting packed and align representation hints
-  --> $DIR/conflicting-repr-hints.rs:31:1
+  --> $DIR/conflicting-repr-hints.rs:33:1
    |
 LL | struct G(i32);
    | ^^^^^^^^^^^^^^
 
 error[E0587]: type has conflicting packed and align representation hints
-  --> $DIR/conflicting-repr-hints.rs:35:1
+  --> $DIR/conflicting-repr-hints.rs:37:1
    |
 LL | struct H(i32);
    | ^^^^^^^^^^^^^^
 
 error[E0634]: type has conflicting packed representation hints
-  --> $DIR/conflicting-repr-hints.rs:38:1
+  --> $DIR/conflicting-repr-hints.rs:40:1
    |
 LL | struct I(i32);
    | ^^^^^^^^^^^^^^
 
 error[E0634]: type has conflicting packed representation hints
-  --> $DIR/conflicting-repr-hints.rs:42:1
+  --> $DIR/conflicting-repr-hints.rs:44:1
    |
 LL | struct J(i32);
    | ^^^^^^^^^^^^^^
 
 error[E0587]: type has conflicting packed and align representation hints
-  --> $DIR/conflicting-repr-hints.rs:48:1
+  --> $DIR/conflicting-repr-hints.rs:50:1
    |
 LL | / union X {
 LL | |
@@ -50,7 +57,7 @@ LL | | }
    | |_^
 
 error[E0587]: type has conflicting packed and align representation hints
-  --> $DIR/conflicting-repr-hints.rs:55:1
+  --> $DIR/conflicting-repr-hints.rs:57:1
    |
 LL | / union Y {
 LL | |
@@ -59,7 +66,7 @@ LL | | }
    | |_^
 
 error[E0587]: type has conflicting packed and align representation hints
-  --> $DIR/conflicting-repr-hints.rs:62:1
+  --> $DIR/conflicting-repr-hints.rs:64:1
    |
 LL | / union Z {
 LL | |
diff --git a/src/test/ui/feature-gates/feature-gate-repr-simd.rs b/src/test/ui/feature-gates/feature-gate-repr-simd.rs
index 1e4a404fa25..c527404f572 100644
--- a/src/test/ui/feature-gates/feature-gate-repr-simd.rs
+++ b/src/test/ui/feature-gates/feature-gate-repr-simd.rs
@@ -2,6 +2,7 @@
 struct Foo(u64, u64);
 
 #[repr(C)] //~ ERROR conflicting representation hints
+//~^ WARN this was previously accepted
 #[repr(simd)] //~ error: SIMD types are experimental
 struct Bar(u64, u64);
 
diff --git a/src/test/ui/feature-gates/feature-gate-repr-simd.stderr b/src/test/ui/feature-gates/feature-gate-repr-simd.stderr
index 37a7bd0b129..013bad069d8 100644
--- a/src/test/ui/feature-gates/feature-gate-repr-simd.stderr
+++ b/src/test/ui/feature-gates/feature-gate-repr-simd.stderr
@@ -8,7 +8,7 @@ LL | #[repr(simd)]
    = help: add `#![feature(repr_simd)]` to the crate attributes to enable
 
 error[E0658]: SIMD types are experimental and possibly buggy
-  --> $DIR/feature-gate-repr-simd.rs:5:1
+  --> $DIR/feature-gate-repr-simd.rs:6:1
    |
 LL | #[repr(simd)]
    | ^^^^^^^^^^^^^
@@ -21,8 +21,13 @@ error[E0566]: conflicting representation hints
    |
 LL | #[repr(C)]
    |        ^
+LL |
 LL | #[repr(simd)]
    |        ^^^^
+   |
+   = note: `#[deny(conflicting_repr_hints)]` on by default
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/issues/issue-47094.rs b/src/test/ui/issues/issue-47094.rs
index 3258ee92a74..c5d37feb144 100644
--- a/src/test/ui/issues/issue-47094.rs
+++ b/src/test/ui/issues/issue-47094.rs
@@ -1,10 +1,12 @@
 #[repr(C, u8)] //~ ERROR conflicting representation hints
+//~^ WARN this was previously accepted
 enum Foo {
     A,
     B,
 }
 
 #[repr(C)] //~ ERROR conflicting representation hints
+//~^ WARN this was previously accepted
 #[repr(u8)]
 enum Bar {
     A,
diff --git a/src/test/ui/issues/issue-47094.stderr b/src/test/ui/issues/issue-47094.stderr
index c807f644fd3..e323ce66029 100644
--- a/src/test/ui/issues/issue-47094.stderr
+++ b/src/test/ui/issues/issue-47094.stderr
@@ -3,14 +3,22 @@ error[E0566]: conflicting representation hints
    |
 LL | #[repr(C, u8)]
    |        ^  ^^
+   |
+   = note: `#[deny(conflicting_repr_hints)]` on by default
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
 
 error[E0566]: conflicting representation hints
-  --> $DIR/issue-47094.rs:7:8
+  --> $DIR/issue-47094.rs:8:8
    |
 LL | #[repr(C)]
    |        ^
+LL |
 LL | #[repr(u8)]
    |        ^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #68585 <https://github.com/rust-lang/rust/issues/68585>
 
 error: aborting due to 2 previous errors