aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/cfg
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/cfg')
-rw-r--r--tests/ui/cfg/packed_sneaky-span-issue-1.rs4
-rw-r--r--tests/ui/cfg/packed_sneaky-span-issue-1.stderr10
-rw-r--r--tests/ui/cfg/packed_sneaky-span-issue-2.rs4
-rw-r--r--tests/ui/cfg/packed_sneaky-span-issue-2.stderr10
-rw-r--r--tests/ui/cfg/unsupported.rs4
-rw-r--r--tests/ui/cfg/unsupported.stderr9
6 files changed, 32 insertions, 9 deletions
diff --git a/tests/ui/cfg/packed_sneaky-span-issue-1.rs b/tests/ui/cfg/packed_sneaky-span-issue-1.rs
index 8455d07..42f57b5 100644
--- a/tests/ui/cfg/packed_sneaky-span-issue-1.rs
+++ b/tests/ui/cfg/packed_sneaky-span-issue-1.rs
@@ -1,12 +1,10 @@
use auxiliary_macro::hidden_repr;
use pin_project::pin_project;
-//~ ERROR may not be used on #[repr(packed)] types
-// span is lost.
-// Refs: https://github.com/rust-lang/rust/issues/43081
#[pin_project]
#[hidden_repr(packed)]
struct S {
+ //~^ ERROR may not be used on #[repr(packed)] types
#[cfg(not(any()))]
#[pin]
f: u32,
diff --git a/tests/ui/cfg/packed_sneaky-span-issue-1.stderr b/tests/ui/cfg/packed_sneaky-span-issue-1.stderr
index f4d7dee..abe3ecd 100644
--- a/tests/ui/cfg/packed_sneaky-span-issue-1.stderr
+++ b/tests/ui/cfg/packed_sneaky-span-issue-1.stderr
@@ -1 +1,11 @@
error: #[pin_project] attribute may not be used on #[repr(packed)] types
+ --> $DIR/packed_sneaky-span-issue-1.rs:6:1
+ |
+6 | / struct S {
+7 | | //~^ ERROR may not be used on #[repr(packed)] types
+8 | | #[cfg(not(any()))]
+9 | | #[pin]
+... |
+13 | | f: u8,
+14 | | }
+ | |_^
diff --git a/tests/ui/cfg/packed_sneaky-span-issue-2.rs b/tests/ui/cfg/packed_sneaky-span-issue-2.rs
index 01706ee..948d72c 100644
--- a/tests/ui/cfg/packed_sneaky-span-issue-2.rs
+++ b/tests/ui/cfg/packed_sneaky-span-issue-2.rs
@@ -1,12 +1,10 @@
use auxiliary_macro::hidden_repr;
use pin_project::pin_project;
-//~ ERROR may not be used on #[repr(packed)] types
-// span is lost.
-// Refs: https://github.com/rust-lang/rust/issues/43081
#[pin_project]
#[hidden_repr(packed)]
struct S {
+ //~^ ERROR may not be used on #[repr(packed)] types
#[cfg(any())]
#[pin]
f: u32,
diff --git a/tests/ui/cfg/packed_sneaky-span-issue-2.stderr b/tests/ui/cfg/packed_sneaky-span-issue-2.stderr
index f4d7dee..a957ceb 100644
--- a/tests/ui/cfg/packed_sneaky-span-issue-2.stderr
+++ b/tests/ui/cfg/packed_sneaky-span-issue-2.stderr
@@ -1 +1,11 @@
error: #[pin_project] attribute may not be used on #[repr(packed)] types
+ --> $DIR/packed_sneaky-span-issue-2.rs:6:1
+ |
+6 | / struct S {
+7 | | //~^ ERROR may not be used on #[repr(packed)] types
+8 | | #[cfg(any())]
+9 | | #[pin]
+... |
+13 | | f: u8,
+14 | | }
+ | |_^
diff --git a/tests/ui/cfg/unsupported.rs b/tests/ui/cfg/unsupported.rs
index c450f6f..b950d4b 100644
--- a/tests/ui/cfg/unsupported.rs
+++ b/tests/ui/cfg/unsupported.rs
@@ -1,10 +1,8 @@
use pin_project::pin_project;
-//~ ERROR may not be used on structs with zero fields
-// span is lost.
-// Refs: https://github.com/rust-lang/rust/issues/43081
#[pin_project]
struct S {
+ //~^ ERROR may not be used on structs with zero fields
#[cfg(any())]
#[pin]
f: u8,
diff --git a/tests/ui/cfg/unsupported.stderr b/tests/ui/cfg/unsupported.stderr
index 0ee8676..b3bd1ae 100644
--- a/tests/ui/cfg/unsupported.stderr
+++ b/tests/ui/cfg/unsupported.stderr
@@ -1 +1,10 @@
error: #[pin_project] attribute may not be used on structs with zero fields
+ --> $DIR/unsupported.rs:4:1
+ |
+4 | / struct S {
+5 | | //~^ ERROR may not be used on structs with zero fields
+6 | | #[cfg(any())]
+7 | | #[pin]
+8 | | f: u8,
+9 | | }
+ | |_^