From 9918693037dce8aa4bb6f08741b6812923486c18 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 11:26:03 +0200 Subject: Merging upstream version 1.76.0+dfsg1. Signed-off-by: Daniel Baumann --- .../tests/ui/pin_project/conflict-unpin.rs | 24 +++++++++++++++ .../tests/ui/pin_project/conflict-unpin.stderr | 34 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) (limited to 'vendor/pin-project-lite/tests/ui/pin_project') diff --git a/vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs b/vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs index f702f064d..bdab20fc2 100644 --- a/vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs +++ b/vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs @@ -37,4 +37,28 @@ pin_project! { //~ ERROR E0119 // conflicting implementations impl Unpin for Baz {} // Conditional Unpin impl +pin_project! { //~ ERROR E0119 + #[project(!Unpin)] + struct Qux { + #[pin] + future: T, + field: U, + } +} + +// conflicting implementations +impl Unpin for Qux {} // Non-conditional Unpin impl + +pin_project! { //~ ERROR E0119 + #[project(!Unpin)] + struct Fred { + #[pin] + future: T, + field: U, + } +} + +// conflicting implementations +impl Unpin for Fred {} // Conditional Unpin impl + fn main() {} diff --git a/vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr b/vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr index 3ac8c1f83..cf9818e08 100644 --- a/vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr +++ b/vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr @@ -48,3 +48,37 @@ error[E0119]: conflicting implementations of trait `Unpin` for type `Baz<_, _>` | -------------------------------------------- first implementation here | = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0119]: conflicting implementations of trait `Unpin` for type `Qux<_, _>` + --> tests/ui/pin_project/conflict-unpin.rs:40:1 + | +40 | / pin_project! { //~ ERROR E0119 +41 | | #[project(!Unpin)] +42 | | struct Qux { +43 | | #[pin] +... | +46 | | } +47 | | } + | |_^ conflicting implementation for `Qux<_, _>` +... +50 | impl Unpin for Qux {} // Non-conditional Unpin impl + | ------------------------------ first implementation here + | + = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0119]: conflicting implementations of trait `Unpin` for type `Fred<_, _>` + --> tests/ui/pin_project/conflict-unpin.rs:52:1 + | +52 | / pin_project! { //~ ERROR E0119 +53 | | #[project(!Unpin)] +54 | | struct Fred { +55 | | #[pin] +... | +58 | | } +59 | | } + | |_^ conflicting implementation for `Fred<_, _>` +... +62 | impl Unpin for Fred {} // Conditional Unpin impl + | --------------------------------------------- first implementation here + | + = note: this error originates in the macro `$crate::__pin_project_make_unpin_impl` which comes from the expansion of the macro `pin_project` (in Nightly builds, run with -Z macro-backtrace for more info) -- cgit v1.2.3