diff options
Diffstat (limited to 'tests/ui/cfg')
-rw-r--r-- | tests/ui/cfg/cfg_attr-type-mismatch.rs | 3 | ||||
-rw-r--r-- | tests/ui/cfg/cfg_attr-type-mismatch.stderr | 8 | ||||
-rw-r--r-- | tests/ui/cfg/packed_sneaky-span-issue-1.rs | 3 | ||||
-rw-r--r-- | tests/ui/cfg/packed_sneaky-span-issue-1.stderr | 14 | ||||
-rw-r--r-- | tests/ui/cfg/packed_sneaky-span-issue-2.rs | 3 | ||||
-rw-r--r-- | tests/ui/cfg/packed_sneaky-span-issue-2.stderr | 14 | ||||
-rw-r--r-- | tests/ui/cfg/unsupported.stderr | 5 |
7 files changed, 19 insertions, 31 deletions
diff --git a/tests/ui/cfg/cfg_attr-type-mismatch.rs b/tests/ui/cfg/cfg_attr-type-mismatch.rs index b075af9..1b9664b 100644 --- a/tests/ui/cfg/cfg_attr-type-mismatch.rs +++ b/tests/ui/cfg/cfg_attr-type-mismatch.rs @@ -1,6 +1,7 @@ -use pin_project::pin_project; use std::pin::Pin; +use pin_project::pin_project; + #[cfg_attr(not(any()), pin_project)] struct Foo<T> { #[cfg_attr(any(), pin)] diff --git a/tests/ui/cfg/cfg_attr-type-mismatch.stderr b/tests/ui/cfg/cfg_attr-type-mismatch.stderr index 89172a2..576a08c 100644 --- a/tests/ui/cfg/cfg_attr-type-mismatch.stderr +++ b/tests/ui/cfg/cfg_attr-type-mismatch.stderr @@ -1,7 +1,7 @@ error[E0308]: mismatched types - --> $DIR/cfg_attr-type-mismatch.rs:19:27 + --> $DIR/cfg_attr-type-mismatch.rs:20:27 | -19 | let _: Pin<&mut u8> = x.f; //~ ERROR E0308 +20 | let _: Pin<&mut u8> = x.f; //~ ERROR E0308 | ------------ ^^^ expected struct `Pin`, found `&mut u8` | | | expected due to this @@ -10,9 +10,9 @@ error[E0308]: mismatched types found mutable reference `&mut u8` error[E0308]: mismatched types - --> $DIR/cfg_attr-type-mismatch.rs:23:22 + --> $DIR/cfg_attr-type-mismatch.rs:24:22 | -23 | let _: &mut u8 = x.f; //~ ERROR E0308 +24 | let _: &mut u8 = x.f; //~ ERROR E0308 | ------- ^^^ | | | | | expected `&mut u8`, found struct `Pin` diff --git a/tests/ui/cfg/packed_sneaky-span-issue-1.rs b/tests/ui/cfg/packed_sneaky-span-issue-1.rs index 42f57b5..7e19952 100644 --- a/tests/ui/cfg/packed_sneaky-span-issue-1.rs +++ b/tests/ui/cfg/packed_sneaky-span-issue-1.rs @@ -2,9 +2,8 @@ use auxiliary_macro::hidden_repr; use pin_project::pin_project; #[pin_project] -#[hidden_repr(packed)] +#[hidden_repr(packed)] //~ ERROR may not be used on #[repr(packed)] types 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 abe3ecd..c98d3ee 100644 --- a/tests/ui/cfg/packed_sneaky-span-issue-1.stderr +++ b/tests/ui/cfg/packed_sneaky-span-issue-1.stderr @@ -1,11 +1,5 @@ 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 | | } - | |_^ + --> $DIR/packed_sneaky-span-issue-1.rs:5:15 + | +5 | #[hidden_repr(packed)] //~ ERROR may not be used on #[repr(packed)] types + | ^^^^^^ diff --git a/tests/ui/cfg/packed_sneaky-span-issue-2.rs b/tests/ui/cfg/packed_sneaky-span-issue-2.rs index 948d72c..fcea76b 100644 --- a/tests/ui/cfg/packed_sneaky-span-issue-2.rs +++ b/tests/ui/cfg/packed_sneaky-span-issue-2.rs @@ -2,9 +2,8 @@ use auxiliary_macro::hidden_repr; use pin_project::pin_project; #[pin_project] -#[hidden_repr(packed)] +#[hidden_repr(packed)] //~ ERROR may not be used on #[repr(packed)] types 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 a957ceb..25b9cdc 100644 --- a/tests/ui/cfg/packed_sneaky-span-issue-2.stderr +++ b/tests/ui/cfg/packed_sneaky-span-issue-2.stderr @@ -1,11 +1,5 @@ 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 | | } - | |_^ + --> $DIR/packed_sneaky-span-issue-2.rs:5:15 + | +5 | #[hidden_repr(packed)] //~ ERROR may not be used on #[repr(packed)] types + | ^^^^^^ diff --git a/tests/ui/cfg/unsupported.stderr b/tests/ui/cfg/unsupported.stderr index b3bd1ae..7ad20d1 100644 --- a/tests/ui/cfg/unsupported.stderr +++ b/tests/ui/cfg/unsupported.stderr @@ -1,7 +1,8 @@ error: #[pin_project] attribute may not be used on structs with zero fields - --> $DIR/unsupported.rs:4:1 + --> $DIR/unsupported.rs:4:10 | -4 | / struct S { +4 | struct S { + | __________^ 5 | | //~^ ERROR may not be used on structs with zero fields 6 | | #[cfg(any())] 7 | | #[pin] |