Skip to content

Commit

Permalink
tests: compile-fail: pin_data: make not #![no_std]
Browse files Browse the repository at this point in the history
  • Loading branch information
y86-dev committed Apr 14, 2024
1 parent a2a3664 commit 06b11e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
4 changes: 1 addition & 3 deletions tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#![no_std]

use core::marker::{self, PhantomPinned};
use pinned_init::*;
use std::marker::{self, PhantomPinned};

#[pin_data]
struct Foo {
Expand Down
22 changes: 11 additions & 11 deletions tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.stderr
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
error: The field `pin1` of type `PhantomPinned` only has an effect, if it has the `#[pin]` attribute.
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:6:1
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:4:1
|
6 | #[pin_data]
4 | #[pin_data]
| ^^^^^^^^^^^
|
= 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)

error: The field `pin2` of type `PhantomPinned` only has an effect, if it has the `#[pin]` attribute.
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:6:1
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:4:1
|
6 | #[pin_data]
4 | #[pin_data]
| ^^^^^^^^^^^
|
= 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)

error: The field `pin3` of type `PhantomPinned` only has an effect, if it has the `#[pin]` attribute.
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:6:1
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:4:1
|
6 | #[pin_data]
4 | #[pin_data]
| ^^^^^^^^^^^
|
= 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)

error: The field `pin4` of type `PhantomPinned` only has an effect, if it has the `#[pin]` attribute.
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:6:1
--> tests/ui/compile-fail/pin_data/no_pin_on_phantompinned.rs:4:1
|
6 | #[pin_data]
4 | #[pin_data]
| ^^^^^^^^^^^
|
= 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)

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

0 comments on commit 06b11e1

Please sign in to comment.