From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- .../tests/ui/pin_project/conflict-drop.rs | 15 + .../tests/ui/pin_project/conflict-drop.stderr | 16 + .../tests/ui/pin_project/conflict-unpin.rs | 40 ++ .../tests/ui/pin_project/conflict-unpin.stderr | 50 +++ .../tests/ui/pin_project/invalid-bounds.rs | 93 +++++ .../tests/ui/pin_project/invalid-bounds.stderr | 428 +++++++++++++++++++++ .../tests/ui/pin_project/invalid.rs | 25 ++ .../tests/ui/pin_project/invalid.stderr | 59 +++ .../ui/pin_project/overlapping_lifetime_names.rs | 10 + .../pin_project/overlapping_lifetime_names.stderr | 75 ++++ .../ui/pin_project/overlapping_unpin_struct.rs | 20 + .../ui/pin_project/overlapping_unpin_struct.stderr | 33 ++ .../tests/ui/pin_project/packed.rs | 21 + .../tests/ui/pin_project/packed.stderr | 57 +++ .../tests/ui/pin_project/unpin_sneaky.rs | 12 + .../tests/ui/pin_project/unpin_sneaky.stderr | 11 + .../tests/ui/pin_project/unsupported.rs | 27 ++ .../tests/ui/pin_project/unsupported.stderr | 79 ++++ .../tests/ui/pinned_drop/call-drop-inner.rs | 17 + .../tests/ui/pinned_drop/call-drop-inner.stderr | 22 ++ .../tests/ui/pinned_drop/conditional-drop-impl.rs | 26 ++ .../ui/pinned_drop/conditional-drop-impl.stderr | 38 ++ 22 files changed, 1174 insertions(+) create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-drop.rs create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-drop.stderr create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/invalid-bounds.rs create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/invalid-bounds.stderr create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/invalid.rs create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/invalid.stderr create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.rs create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.stderr create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.rs create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.stderr create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/packed.rs create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/packed.stderr create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/unpin_sneaky.rs create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/unpin_sneaky.stderr create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/unsupported.rs create mode 100644 third_party/rust/pin-project-lite/tests/ui/pin_project/unsupported.stderr create mode 100644 third_party/rust/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.rs create mode 100644 third_party/rust/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.stderr create mode 100644 third_party/rust/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.rs create mode 100644 third_party/rust/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.stderr (limited to 'third_party/rust/pin-project-lite/tests/ui') diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-drop.rs b/third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-drop.rs new file mode 100644 index 0000000000..870059d62f --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-drop.rs @@ -0,0 +1,15 @@ +use pin_project_lite::pin_project; + +pin_project! { //~ ERROR E0119 + struct Foo { + #[pin] + future: T, + field: U, + } +} + +impl Drop for Foo { + fn drop(&mut self) {} +} + +fn main() {} diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-drop.stderr b/third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-drop.stderr new file mode 100644 index 0000000000..66872bd4bd --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-drop.stderr @@ -0,0 +1,16 @@ +error[E0119]: conflicting implementations of trait `_::MustNotImplDrop` for type `Foo<_, _>` + --> tests/ui/pin_project/conflict-drop.rs:3:1 + | +3 | / pin_project! { //~ ERROR E0119 +4 | | struct Foo { +5 | | #[pin] +6 | | future: T, +7 | | field: U, +8 | | } +9 | | } + | | ^ + | | | + | |_first implementation here + | conflicting implementation for `Foo<_, _>` + | + = note: this error originates in the macro `$crate::__pin_project_make_drop_impl` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs b/third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs new file mode 100644 index 0000000000..f702f064de --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs @@ -0,0 +1,40 @@ +use pin_project_lite::pin_project; + +// The same implementation. + +pin_project! { //~ ERROR E0119 + struct Foo { + #[pin] + future: T, + field: U, + } +} + +// conflicting implementations +impl Unpin for Foo where T: Unpin {} // Conditional Unpin impl + +// The implementation that under different conditions. + +pin_project! { //~ ERROR E0119 + struct Bar { + #[pin] + future: T, + field: U, + } +} + +// conflicting implementations +impl Unpin for Bar {} // Non-conditional Unpin impl + +pin_project! { //~ ERROR E0119 + struct Baz { + #[pin] + future: T, + field: U, + } +} + +// conflicting implementations +impl Unpin for Baz {} // Conditional Unpin impl + +fn main() {} diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr b/third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr new file mode 100644 index 0000000000..bd30fafdd3 --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr @@ -0,0 +1,50 @@ +error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Foo<_, _>` + --> tests/ui/pin_project/conflict-unpin.rs:5:1 + | +5 | / pin_project! { //~ ERROR E0119 +6 | | struct Foo { +7 | | #[pin] +8 | | future: T, +9 | | field: U, +10 | | } +11 | | } + | |_^ conflicting implementation for `Foo<_, _>` +... +14 | impl Unpin for Foo where T: Unpin {} // Conditional Unpin impl + | --------------------------------------------- first implementation here + | + = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Bar<_, _>` + --> tests/ui/pin_project/conflict-unpin.rs:18:1 + | +18 | / pin_project! { //~ ERROR E0119 +19 | | struct Bar { +20 | | #[pin] +21 | | future: T, +22 | | field: U, +23 | | } +24 | | } + | |_^ conflicting implementation for `Bar<_, _>` +... +27 | impl Unpin for Bar {} // Non-conditional Unpin impl + | ------------------------------ first implementation here + | + = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0119]: conflicting implementations of trait `std::marker::Unpin` for type `Baz<_, _>` + --> tests/ui/pin_project/conflict-unpin.rs:29:1 + | +29 | / pin_project! { //~ ERROR E0119 +30 | | struct Baz { +31 | | #[pin] +32 | | future: T, +33 | | field: U, +34 | | } +35 | | } + | |_^ conflicting implementation for `Baz<_, _>` +... +38 | impl Unpin for Baz {} // Conditional Unpin impl + | -------------------------------------------- first implementation here + | + = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/invalid-bounds.rs b/third_party/rust/pin-project-lite/tests/ui/pin_project/invalid-bounds.rs new file mode 100644 index 0000000000..64b397a37e --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/invalid-bounds.rs @@ -0,0 +1,93 @@ +use pin_project_lite::pin_project; + +pin_project! { + struct Generics1 { //~ ERROR no rules expected the token `:` + field: T, + } +} + +pin_project! { + struct Generics2 { //~ ERROR no rules expected the token `:` + field: T, + } +} + +pin_project! { + struct Generics3 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` + field: T, + } +} + +pin_project! { + struct Generics4 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` + field: T, + } +} + +pin_project! { + struct Generics5 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` + field: T, + } +} + +pin_project! { + struct Generics6 { //~ ERROR no rules expected the token `Sized` + field: T, + } +} + +pin_project! { + struct WhereClause1 + where + T: 'static : Sized //~ ERROR no rules expected the token `:` + { + field: T, + } +} + +pin_project! { + struct WhereClause2 + where + T: 'static : ?Sized //~ ERROR no rules expected the token `:` + { + field: T, + } +} + +pin_project! { + struct WhereClause3 + where + T: Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:` + { + field: T, + } +} + +pin_project! { + struct WhereClause4 + where + T: ?Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:` + { + field: T, + } +} + +pin_project! { + struct WhereClause5 + where + T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:` + { + field: T, + } +} + +pin_project! { + struct WhereClause6 + where + T: ?Sized : Sized //~ ERROR no rules expected the token `Sized` + { + field: T, + } +} + +fn main() {} diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/invalid-bounds.stderr b/third_party/rust/pin-project-lite/tests/ui/pin_project/invalid-bounds.stderr new file mode 100644 index 0000000000..40e79bf928 --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/invalid-bounds.stderr @@ -0,0 +1,428 @@ +error: no rules expected the token `:` + --> tests/ui/pin_project/invalid-bounds.rs:4:33 + | +4 | struct Generics1 { //~ ERROR no rules expected the token `:` + | ^ no rules expected this token in macro call + +error: no rules expected the token `:` + --> tests/ui/pin_project/invalid-bounds.rs:10:33 + | +10 | struct Generics2 { //~ ERROR no rules expected the token `:` + | ^ no rules expected this token in macro call + +error: expected one of `+`, `,`, `=`, or `>`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:15:1 + | +15 | / pin_project! { +16 | | struct Generics3 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` +17 | | field: T, +18 | | } +19 | | } + | | ^ + | | | + | | expected one of `+`, `,`, `=`, or `>` + | |_unexpected token + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, `=`, or `>`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:15:1 + | +15 | / pin_project! { +16 | | struct Generics3 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` +17 | | field: T, +18 | | } +19 | | } + | | ^ + | | | + | |_expected one of `+`, `,`, `=`, or `>` + | unexpected token + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, `=`, or `>`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:15:1 + | +15 | / pin_project! { +16 | | struct Generics3 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` +17 | | field: T, +18 | | } +19 | | } + | | ^ + | | | + | | expected one of `+`, `,`, `=`, or `>` + | |_unexpected token + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, `=`, or `>`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:15:1 + | +15 | / pin_project! { +16 | | struct Generics3 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` +17 | | field: T, +18 | | } +19 | | } + | | ^ + | | | + | | expected one of `+`, `,`, `=`, or `>` + | |_unexpected token + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, `=`, or `>`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:21:1 + | +21 | / pin_project! { +22 | | struct Generics4 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` +23 | | field: T, +24 | | } +25 | | } + | | ^ + | | | + | | expected one of `+`, `,`, `=`, or `>` + | |_unexpected token + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, `=`, or `>`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:21:1 + | +21 | / pin_project! { +22 | | struct Generics4 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` +23 | | field: T, +24 | | } +25 | | } + | | ^ + | | | + | |_expected one of `+`, `,`, `=`, or `>` + | unexpected token + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, `=`, or `>`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:21:1 + | +21 | / pin_project! { +22 | | struct Generics4 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` +23 | | field: T, +24 | | } +25 | | } + | | ^ + | | | + | | expected one of `+`, `,`, `=`, or `>` + | |_unexpected token + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, `=`, or `>`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:21:1 + | +21 | / pin_project! { +22 | | struct Generics4 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` +23 | | field: T, +24 | | } +25 | | } + | | ^ + | | | + | | expected one of `+`, `,`, `=`, or `>` + | |_unexpected token + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, `=`, or `>`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:27:1 + | +27 | / pin_project! { +28 | | struct Generics5 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` +29 | | field: T, +30 | | } +31 | | } + | | ^ + | | | + | | expected one of `+`, `,`, `=`, or `>` + | |_unexpected token + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, `=`, or `>`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:27:1 + | +27 | / pin_project! { +28 | | struct Generics5 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` +29 | | field: T, +30 | | } +31 | | } + | | ^ + | | | + | |_expected one of `+`, `,`, `=`, or `>` + | unexpected token + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, `=`, or `>`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:27:1 + | +27 | / pin_project! { +28 | | struct Generics5 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` +29 | | field: T, +30 | | } +31 | | } + | | ^ + | | | + | | expected one of `+`, `,`, `=`, or `>` + | |_unexpected token + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, `=`, or `>`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:27:1 + | +27 | / pin_project! { +28 | | struct Generics5 { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:` +29 | | field: T, +30 | | } +31 | | } + | | ^ + | | | + | | expected one of `+`, `,`, `=`, or `>` + | |_unexpected token + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: no rules expected the token `Sized` + --> tests/ui/pin_project/invalid-bounds.rs:34:34 + | +34 | struct Generics6 { //~ ERROR no rules expected the token `Sized` + | ^^^^^ no rules expected this token in macro call + +error: no rules expected the token `:` + --> tests/ui/pin_project/invalid-bounds.rs:42:20 + | +42 | T: 'static : Sized //~ ERROR no rules expected the token `:` + | ^ no rules expected this token in macro call + +error: no rules expected the token `:` + --> tests/ui/pin_project/invalid-bounds.rs:51:20 + | +51 | T: 'static : ?Sized //~ ERROR no rules expected the token `:` + | ^ no rules expected this token in macro call + +error: expected `{` after struct name, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:57:1 + | +57 | / pin_project! { +58 | | struct WhereClause3 +59 | | where +60 | | T: Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:` +... | +63 | | } +64 | | } + | | ^ + | | | + | |_expected `{` after struct name + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, or `{`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:57:1 + | +57 | / pin_project! { +58 | | struct WhereClause3 +59 | | where +60 | | T: Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:` +... | +63 | | } +64 | | } + | | ^ + | | | + | |_expected one of `+`, `,`, or `{` + | unexpected token + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected `{` after struct name, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:57:1 + | +57 | / pin_project! { +58 | | struct WhereClause3 +59 | | where +60 | | T: Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:` +... | +63 | | } +64 | | } + | | ^ + | | | + | |_expected `{` after struct name + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected `{` after struct name, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:57:1 + | +57 | / pin_project! { +58 | | struct WhereClause3 +59 | | where +60 | | T: Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:` +... | +63 | | } +64 | | } + | | ^ + | | | + | |_expected `{` after struct name + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected `{` after struct name, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:66:1 + | +66 | / pin_project! { +67 | | struct WhereClause4 +68 | | where +69 | | T: ?Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:` +... | +72 | | } +73 | | } + | | ^ + | | | + | |_expected `{` after struct name + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, or `{`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:66:1 + | +66 | / pin_project! { +67 | | struct WhereClause4 +68 | | where +69 | | T: ?Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:` +... | +72 | | } +73 | | } + | | ^ + | | | + | |_expected one of `+`, `,`, or `{` + | unexpected token + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected `{` after struct name, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:66:1 + | +66 | / pin_project! { +67 | | struct WhereClause4 +68 | | where +69 | | T: ?Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:` +... | +72 | | } +73 | | } + | | ^ + | | | + | |_expected `{` after struct name + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected `{` after struct name, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:66:1 + | +66 | / pin_project! { +67 | | struct WhereClause4 +68 | | where +69 | | T: ?Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:` +... | +72 | | } +73 | | } + | | ^ + | | | + | |_expected `{` after struct name + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected `{` after struct name, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:75:1 + | +75 | / pin_project! { +76 | | struct WhereClause5 +77 | | where +78 | | T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:` +... | +81 | | } +82 | | } + | | ^ + | | | + | |_expected `{` after struct name + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected one of `+`, `,`, or `{`, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:75:1 + | +75 | / pin_project! { +76 | | struct WhereClause5 +77 | | where +78 | | T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:` +... | +81 | | } +82 | | } + | | ^ + | | | + | |_expected one of `+`, `,`, or `{` + | unexpected token + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected `{` after struct name, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:75:1 + | +75 | / pin_project! { +76 | | struct WhereClause5 +77 | | where +78 | | T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:` +... | +81 | | } +82 | | } + | | ^ + | | | + | |_expected `{` after struct name + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: expected `{` after struct name, found `:` + --> tests/ui/pin_project/invalid-bounds.rs:75:1 + | +75 | / pin_project! { +76 | | struct WhereClause5 +77 | | where +78 | | T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:` +... | +81 | | } +82 | | } + | | ^ + | | | + | |_expected `{` after struct name + | in this macro invocation + | + = note: this error originates in the macro `$crate::__pin_project_parse_generics` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: no rules expected the token `Sized` + --> tests/ui/pin_project/invalid-bounds.rs:87:21 + | +87 | T: ?Sized : Sized //~ ERROR no rules expected the token `Sized` + | ^^^^^ no rules expected this token in macro call diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/invalid.rs b/third_party/rust/pin-project-lite/tests/ui/pin_project/invalid.rs new file mode 100644 index 0000000000..e0ea61d4f7 --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/invalid.rs @@ -0,0 +1,25 @@ +use pin_project_lite::pin_project; + +pin_project! { + struct A { + #[pin()] //~ ERROR no rules expected the token `(` + pinned: T, + } +} + +pin_project! { + #[pin] //~ ERROR cannot find attribute `pin` in this scope + struct B { + pinned: T, + } +} + +pin_project! { + struct C { + #[pin] + #[pin] //~ ERROR no rules expected the token `#` + pinned: T, + } +} + +fn main() {} diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/invalid.stderr b/third_party/rust/pin-project-lite/tests/ui/pin_project/invalid.stderr new file mode 100644 index 0000000000..623a886722 --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/invalid.stderr @@ -0,0 +1,59 @@ +error: no rules expected the token `struct` + --> tests/ui/pin_project/invalid.rs:3:1 + | +3 | / pin_project! { +4 | | struct A { +5 | | #[pin()] //~ ERROR no rules expected the token `(` +6 | | pinned: T, +7 | | } +8 | | } + | |_^ no rules expected this token in macro call + | + = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: no rules expected the token `struct` + --> tests/ui/pin_project/invalid.rs:3:1 + | +3 | / pin_project! { +4 | | struct A { +5 | | #[pin()] //~ ERROR no rules expected the token `(` +6 | | pinned: T, +7 | | } +8 | | } + | |_^ no rules expected this token in macro call + | + = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: no rules expected the token `struct` + --> tests/ui/pin_project/invalid.rs:17:1 + | +17 | / pin_project! { +18 | | struct C { +19 | | #[pin] +20 | | #[pin] //~ ERROR no rules expected the token `#` +21 | | pinned: T, +22 | | } +23 | | } + | |_^ no rules expected this token in macro call + | + = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: no rules expected the token `struct` + --> tests/ui/pin_project/invalid.rs:17:1 + | +17 | / pin_project! { +18 | | struct C { +19 | | #[pin] +20 | | #[pin] //~ ERROR no rules expected the token `#` +21 | | pinned: T, +22 | | } +23 | | } + | |_^ no rules expected this token in macro call + | + = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: cannot find attribute `pin` in this scope + --> tests/ui/pin_project/invalid.rs:11:7 + | +11 | #[pin] //~ ERROR cannot find attribute `pin` in this scope + | ^^^ diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.rs b/third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.rs new file mode 100644 index 0000000000..117c18d74c --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.rs @@ -0,0 +1,10 @@ +use pin_project_lite::pin_project; + +pin_project! { //~ ERROR E0263,E0496 + pub struct Foo<'__pin, T> { + #[pin] + field: &'__pin mut T, + } +} + +fn main() {} diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.stderr b/third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.stderr new file mode 100644 index 0000000000..35074d0753 --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.stderr @@ -0,0 +1,75 @@ +error[E0263]: lifetime name `'__pin` declared twice in the same scope + --> tests/ui/pin_project/overlapping_lifetime_names.rs:4:20 + | +3 | / pin_project! { //~ ERROR E0263,E0496 +4 | | pub struct Foo<'__pin, T> { + | | ^^^^^^ declared twice +5 | | #[pin] +6 | | field: &'__pin mut T, +7 | | } +8 | | } + | |_- previous declaration here + +error[E0263]: lifetime name `'__pin` declared twice in the same scope + --> tests/ui/pin_project/overlapping_lifetime_names.rs:4:20 + | +3 | / pin_project! { //~ ERROR E0263,E0496 +4 | | pub struct Foo<'__pin, T> { + | | ^^^^^^ declared twice +5 | | #[pin] +6 | | field: &'__pin mut T, +7 | | } +8 | | } + | |_- previous declaration here + +error[E0263]: lifetime name `'__pin` declared twice in the same scope + --> tests/ui/pin_project/overlapping_lifetime_names.rs:4:20 + | +3 | / pin_project! { //~ ERROR E0263,E0496 +4 | | pub struct Foo<'__pin, T> { + | | ^^^^^^ declared twice +5 | | #[pin] +6 | | field: &'__pin mut T, +7 | | } +8 | | } + | |_- previous declaration here + +error[E0496]: lifetime name `'__pin` shadows a lifetime name that is already in scope + --> tests/ui/pin_project/overlapping_lifetime_names.rs:3:1 + | +3 | / pin_project! { //~ ERROR E0263,E0496 +4 | | pub struct Foo<'__pin, T> { + | | ------ first declared here +5 | | #[pin] +6 | | field: &'__pin mut T, +7 | | } +8 | | } + | |_^ lifetime `'__pin` already in scope + | + = note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0496]: lifetime name `'__pin` shadows a lifetime name that is already in scope + --> tests/ui/pin_project/overlapping_lifetime_names.rs:3:1 + | +3 | / pin_project! { //~ ERROR E0263,E0496 +4 | | pub struct Foo<'__pin, T> { + | | ------ first declared here +5 | | #[pin] +6 | | field: &'__pin mut T, +7 | | } +8 | | } + | |_^ lifetime `'__pin` already in scope + | + = note: this error originates in the macro `$crate::__pin_project_struct_make_proj_method` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0263]: lifetime name `'__pin` declared twice in the same scope + --> tests/ui/pin_project/overlapping_lifetime_names.rs:4:20 + | +3 | / pin_project! { //~ ERROR E0263,E0496 +4 | | pub struct Foo<'__pin, T> { + | | ^^^^^^ declared twice +5 | | #[pin] +6 | | field: &'__pin mut T, +7 | | } +8 | | } + | |_- previous declaration here diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.rs b/third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.rs new file mode 100644 index 0000000000..25131d17d1 --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.rs @@ -0,0 +1,20 @@ +use std::marker::PhantomPinned; + +use pin_project_lite::pin_project; + +pin_project! { + struct Foo { + #[pin] + inner: T, + } +} + +struct __Origin {} + +impl Unpin for __Origin {} + +fn is_unpin() {} + +fn main() { + is_unpin::>(); //~ ERROR E0277 +} diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.stderr b/third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.stderr new file mode 100644 index 0000000000..303e7cbb58 --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.stderr @@ -0,0 +1,33 @@ +error[E0277]: `PhantomPinned` cannot be unpinned + --> tests/ui/pin_project/overlapping_unpin_struct.rs:19:5 + | +19 | is_unpin::>(); //~ ERROR E0277 + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `_::__Origin<'_, PhantomPinned>`, the trait `Unpin` is not implemented for `PhantomPinned` + | + = note: consider using `Box::pin` +note: required because it appears within the type `_::__Origin<'_, PhantomPinned>` + --> tests/ui/pin_project/overlapping_unpin_struct.rs:5:1 + | +5 | / pin_project! { +6 | | struct Foo { +7 | | #[pin] +8 | | inner: T, +9 | | } +10 | | } + | |_^ +note: required because of the requirements on the impl of `Unpin` for `Foo` + --> tests/ui/pin_project/overlapping_unpin_struct.rs:5:1 + | +5 | / pin_project! { +6 | | struct Foo { +7 | | #[pin] +8 | | inner: T, +9 | | } +10 | | } + | |_^ +note: required by a bound in `is_unpin` + --> tests/ui/pin_project/overlapping_unpin_struct.rs:16:16 + | +16 | fn is_unpin() {} + | ^^^^^ required by this bound in `is_unpin` + = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/packed.rs b/third_party/rust/pin-project-lite/tests/ui/pin_project/packed.rs new file mode 100644 index 0000000000..50afb118c8 --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/packed.rs @@ -0,0 +1,21 @@ +#![allow(unaligned_references)] + +use pin_project_lite::pin_project; + +pin_project! { //~ ERROR reference to packed field is unaligned + #[repr(packed, C)] + struct Packed { + #[pin] + field: u16, + } +} + +pin_project! { //~ ERROR reference to packed field is unaligned + #[repr(packed(2))] + struct PackedN { + #[pin] + field: u32, + } +} + +fn main() {} diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/packed.stderr b/third_party/rust/pin-project-lite/tests/ui/pin_project/packed.stderr new file mode 100644 index 0000000000..81fb4f1fcc --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/packed.stderr @@ -0,0 +1,57 @@ +error: reference to packed field is unaligned + --> tests/ui/pin_project/packed.rs:5:1 + | +5 | / pin_project! { //~ ERROR reference to packed field is unaligned +6 | | #[repr(packed, C)] +7 | | struct Packed { +8 | | #[pin] +9 | | field: u16, +10 | | } +11 | | } + | |_^ + | +note: the lint level is defined here + --> tests/ui/pin_project/packed.rs:5:1 + | +5 | / pin_project! { //~ ERROR reference to packed field is unaligned +6 | | #[repr(packed, C)] +7 | | struct Packed { +8 | | #[pin] +9 | | field: u16, +10 | | } +11 | | } + | |_^ + = 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 #82523 + = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) + = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) + = note: this error originates in the macro `$crate::__pin_project_constant` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: reference to packed field is unaligned + --> tests/ui/pin_project/packed.rs:13:1 + | +13 | / pin_project! { //~ ERROR reference to packed field is unaligned +14 | | #[repr(packed(2))] +15 | | struct PackedN { +16 | | #[pin] +17 | | field: u32, +18 | | } +19 | | } + | |_^ + | +note: the lint level is defined here + --> tests/ui/pin_project/packed.rs:13:1 + | +13 | / pin_project! { //~ ERROR reference to packed field is unaligned +14 | | #[repr(packed(2))] +15 | | struct PackedN { +16 | | #[pin] +17 | | field: u32, +18 | | } +19 | | } + | |_^ + = 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 #82523 + = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced) + = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers) + = note: this error originates in the macro `$crate::__pin_project_constant` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/unpin_sneaky.rs b/third_party/rust/pin-project-lite/tests/ui/pin_project/unpin_sneaky.rs new file mode 100644 index 0000000000..984cc2a219 --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/unpin_sneaky.rs @@ -0,0 +1,12 @@ +use pin_project_lite::pin_project; + +pin_project! { + struct Foo { + #[pin] + inner: u8, + } +} + +impl Unpin for __Origin {} //~ ERROR E0412,E0321 + +fn main() {} diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/unpin_sneaky.stderr b/third_party/rust/pin-project-lite/tests/ui/pin_project/unpin_sneaky.stderr new file mode 100644 index 0000000000..4eb6eff96f --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/unpin_sneaky.stderr @@ -0,0 +1,11 @@ +error[E0412]: cannot find type `__Origin` in this scope + --> tests/ui/pin_project/unpin_sneaky.rs:10:16 + | +10 | impl Unpin for __Origin {} //~ ERROR E0412,E0321 + | ^^^^^^^^ not found in this scope + +error[E0321]: cross-crate traits with a default impl, like `Unpin`, can only be implemented for a struct/enum type, not `[type error]` + --> tests/ui/pin_project/unpin_sneaky.rs:10:1 + | +10 | impl Unpin for __Origin {} //~ ERROR E0412,E0321 + | ^^^^^^^^^^^^^^^^^^^^^^^ can't implement cross-crate trait with a default impl for non-struct/enum type diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/unsupported.rs b/third_party/rust/pin-project-lite/tests/ui/pin_project/unsupported.rs new file mode 100644 index 0000000000..2f80836275 --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/unsupported.rs @@ -0,0 +1,27 @@ +use pin_project_lite::pin_project; + +pin_project! { + struct Struct1 {} //~ ERROR no rules expected the token `}` +} + +pin_project! { + struct Struct2(); //~ ERROR no rules expected the token `(` +} + +pin_project! { + struct Struct3; //~ ERROR no rules expected the token `;` +} + +pin_project! { + enum Enum { //~ ERROR no rules expected the token `enum` + A(u8) + } +} + +pin_project! { + union Union { //~ ERROR no rules expected the token `union` + x: u8, + } +} + +fn main() {} diff --git a/third_party/rust/pin-project-lite/tests/ui/pin_project/unsupported.stderr b/third_party/rust/pin-project-lite/tests/ui/pin_project/unsupported.stderr new file mode 100644 index 0000000000..a7d215a43e --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pin_project/unsupported.stderr @@ -0,0 +1,79 @@ +error: no rules expected the token `}` + --> tests/ui/pin_project/unsupported.rs:3:1 + | +3 | / pin_project! { +4 | | struct Struct1 {} //~ ERROR no rules expected the token `}` +5 | | } + | |_^ no rules expected this token in macro call + | + = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: no rules expected the token `}` + --> tests/ui/pin_project/unsupported.rs:3:1 + | +3 | / pin_project! { +4 | | struct Struct1 {} //~ ERROR no rules expected the token `}` +5 | | } + | |_^ no rules expected this token in macro call + | + = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: no rules expected the token `(` + --> tests/ui/pin_project/unsupported.rs:8:19 + | +8 | struct Struct2(); //~ ERROR no rules expected the token `(` + | ^ no rules expected this token in macro call + +error: no rules expected the token `;` + --> tests/ui/pin_project/unsupported.rs:12:19 + | +12 | struct Struct3; //~ ERROR no rules expected the token `;` + | ^ no rules expected this token in macro call + +error: no rules expected the token `enum` + --> tests/ui/pin_project/unsupported.rs:15:1 + | +15 | / pin_project! { +16 | | enum Enum { //~ ERROR no rules expected the token `enum` +17 | | A(u8) +18 | | } +19 | | } + | |_^ no rules expected this token in macro call + | + = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: no rules expected the token `enum` + --> tests/ui/pin_project/unsupported.rs:15:1 + | +15 | / pin_project! { +16 | | enum Enum { //~ ERROR no rules expected the token `enum` +17 | | A(u8) +18 | | } +19 | | } + | |_^ no rules expected this token in macro call + | + = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: no rules expected the token `union` + --> tests/ui/pin_project/unsupported.rs:21:1 + | +21 | / pin_project! { +22 | | union Union { //~ ERROR no rules expected the token `union` +23 | | x: u8, +24 | | } +25 | | } + | |_^ no rules expected this token in macro call + | + = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: no rules expected the token `union` + --> tests/ui/pin_project/unsupported.rs:21:1 + | +21 | / pin_project! { +22 | | union Union { //~ ERROR no rules expected the token `union` +23 | | x: u8, +24 | | } +25 | | } + | |_^ no rules expected this token in macro call + | + = note: this error originates in the macro `$crate::__pin_project_expand` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/third_party/rust/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.rs b/third_party/rust/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.rs new file mode 100644 index 0000000000..609b3bebad --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.rs @@ -0,0 +1,17 @@ +use pin_project_lite::pin_project; + +pin_project! { + pub struct S { + #[pin] + field: u8, + } + impl PinnedDrop for S { + fn drop(this: Pin<&mut Self>) { + __drop_inner(this); + } + } +} + +fn main() { + let _x = S { field: 0 }; +} diff --git a/third_party/rust/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.stderr b/third_party/rust/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.stderr new file mode 100644 index 0000000000..597f67c84f --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.stderr @@ -0,0 +1,22 @@ +error[E0061]: this function takes 0 arguments but 1 argument was supplied + --> tests/ui/pinned_drop/call-drop-inner.rs:10:13 + | +10 | __drop_inner(this); + | ^^^^^^^^^^^^ ---- argument unexpected + | +note: function defined here + --> tests/ui/pinned_drop/call-drop-inner.rs:3:1 + | +3 | / pin_project! { +4 | | pub struct S { +5 | | #[pin] +6 | | field: u8, +... | +12 | | } +13 | | } + | |_^ + = note: this error originates in the macro `$crate::__pin_project_make_drop_impl` (in Nightly builds, run with -Z macro-backtrace for more info) +help: remove the extra argument + | +10 | __drop_inner(); + | ~~~~~~~~~~~~~~ diff --git a/third_party/rust/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.rs b/third_party/rust/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.rs new file mode 100644 index 0000000000..68b01b265e --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.rs @@ -0,0 +1,26 @@ +use pin_project_lite::pin_project; + +// In `Drop` impl, the implementor must specify the same requirement as type definition. + +struct DropImpl { + f: T, +} + +impl Drop for DropImpl { + //~^ ERROR E0367 + fn drop(&mut self) {} +} + +pin_project! { + //~^ ERROR E0367 + struct PinnedDropImpl { + #[pin] + f: T, + } + + impl PinnedDrop for PinnedDropImpl { + fn drop(_this: Pin<&mut Self>) {} + } +} + +fn main() {} diff --git a/third_party/rust/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.stderr b/third_party/rust/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.stderr new file mode 100644 index 0000000000..d70009c97a --- /dev/null +++ b/third_party/rust/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.stderr @@ -0,0 +1,38 @@ +error[E0367]: `Drop` impl requires `T: Unpin` but the struct it is implemented for does not + --> tests/ui/pinned_drop/conditional-drop-impl.rs:9:9 + | +9 | impl Drop for DropImpl { + | ^^^^^ + | +note: the implementor must specify the same requirement + --> tests/ui/pinned_drop/conditional-drop-impl.rs:5:1 + | +5 | / struct DropImpl { +6 | | f: T, +7 | | } + | |_^ + +error[E0367]: `Drop` impl requires `T: Unpin` but the struct it is implemented for does not + --> tests/ui/pinned_drop/conditional-drop-impl.rs:14:1 + | +14 | / pin_project! { +15 | | //~^ ERROR E0367 +16 | | struct PinnedDropImpl { +17 | | #[pin] +... | +23 | | } +24 | | } + | |_^ + | +note: the implementor must specify the same requirement + --> tests/ui/pinned_drop/conditional-drop-impl.rs:14:1 + | +14 | / pin_project! { +15 | | //~^ ERROR E0367 +16 | | struct PinnedDropImpl { +17 | | #[pin] +... | +23 | | } +24 | | } + | |_^ + = note: this error originates in the macro `$crate::__pin_project_make_drop_impl` (in Nightly builds, run with -Z macro-backtrace for more info) -- cgit v1.2.3