Skip to content

Commit 06b11e1

Browse files
committed
tests: compile-fail: pin_data: make not #![no_std]
1 parent a2a3664 commit 06b11e1

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
#![no_std]
2-
3-
use core::marker::{self, PhantomPinned};
41
use pinned_init::*;
2+
use std::marker::{self, PhantomPinned};
53

64
#[pin_data]
75
struct Foo {
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
error: The field `pin1` of type `PhantomPinned` only has an effect, if it has the `#[pin]` attribute.
2-
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:6:1
2+
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:4:1
33
|
4-
6 | #[pin_data]
4+
4 | #[pin_data]
55
| ^^^^^^^^^^^
66
|
77
= note: this error originates in the macro `$crate::__pin_data` which comes from the expansion of the attribute macro `pin_data` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
error: The field `pin2` of type `PhantomPinned` only has an effect, if it has the `#[pin]` attribute.
10-
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:6:1
10+
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:4:1
1111
|
12-
6 | #[pin_data]
12+
4 | #[pin_data]
1313
| ^^^^^^^^^^^
1414
|
1515
= note: this error originates in the macro `$crate::__pin_data` which comes from the expansion of the attribute macro `pin_data` (in Nightly builds, run with -Z macro-backtrace for more info)
1616

1717
error: The field `pin3` of type `PhantomPinned` only has an effect, if it has the `#[pin]` attribute.
18-
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:6:1
18+
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:4:1
1919
|
20-
6 | #[pin_data]
20+
4 | #[pin_data]
2121
| ^^^^^^^^^^^
2222
|
2323
= note: this error originates in the macro `$crate::__pin_data` which comes from the expansion of the attribute macro `pin_data` (in Nightly builds, run with -Z macro-backtrace for more info)
2424

2525
error: The field `pin4` of type `PhantomPinned` only has an effect, if it has the `#[pin]` attribute.
26-
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:6:1
26+
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:4:1
2727
|
28-
6 | #[pin_data]
28+
4 | #[pin_data]
2929
| ^^^^^^^^^^^
3030
|
3131
= note: this error originates in the macro `$crate::__pin_data` which comes from the expansion of the attribute macro `pin_data` (in Nightly builds, run with -Z macro-backtrace for more info)
3232

3333
warning: unused imports: `PhantomPinned`, `self`
34-
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:3:20
34+
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:2:19
3535
|
36-
3 | use core::marker::{self, PhantomPinned};
37-
| ^^^^ ^^^^^^^^^^^^^
36+
2 | use std::marker::{self, PhantomPinned};
37+
| ^^^^ ^^^^^^^^^^^^^
3838
|
3939
= note: `#[warn(unused_imports)]` on by default

0 commit comments

Comments
 (0)