diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-19 09:26:03 +0000 |
commit | 9918693037dce8aa4bb6f08741b6812923486c18 (patch) | |
tree | 21d2b40bec7e6a7ea664acee056eb3d08e15a1cf /vendor/pin-project-lite/tests/ui/pin_project | |
parent | Releasing progress-linux version 1.75.0+dfsg1-5~progress7.99u1. (diff) | |
download | rustc-9918693037dce8aa4bb6f08741b6812923486c18.tar.xz rustc-9918693037dce8aa4bb6f08741b6812923486c18.zip |
Merging upstream version 1.76.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/pin-project-lite/tests/ui/pin_project')
-rw-r--r-- | vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs | 24 | ||||
-rw-r--r-- | vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr | 34 |
2 files changed, 58 insertions, 0 deletions
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<T: Unpin, U: Unpin> Unpin for Baz<T, U> {} // Conditional Unpin impl +pin_project! { //~ ERROR E0119 + #[project(!Unpin)] + struct Qux<T, U> { + #[pin] + future: T, + field: U, + } +} + +// conflicting implementations +impl<T, U> Unpin for Qux<T, U> {} // Non-conditional Unpin impl + +pin_project! { //~ ERROR E0119 + #[project(!Unpin)] + struct Fred<T, U> { + #[pin] + future: T, + field: U, + } +} + +// conflicting implementations +impl<T: Unpin, U: Unpin> Unpin for Fred<T, U> {} // 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<T, U> { +43 | | #[pin] +... | +46 | | } +47 | | } + | |_^ conflicting implementation for `Qux<_, _>` +... +50 | impl<T, U> Unpin for Qux<T, U> {} // 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<T, U> { +55 | | #[pin] +... | +58 | | } +59 | | } + | |_^ conflicting implementation for `Fred<_, _>` +... +62 | impl<T: Unpin, U: Unpin> Unpin for Fred<T, U> {} // 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) |