From b6eddfd5765060dd19a3ea081db269b817f4f2c2 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 8 Nov 2022 11:09:04 -0800 Subject: [PATCH 1/3] Revert "Delete unpin_impl.rs UI test temporarily" This reverts commit fb6db7d11ec57b0f14d3323ed201887f15a16512. --- tests/ui/unpin_impl.rs | 10 ++++++++++ tests/ui/unpin_impl.stderr | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 tests/ui/unpin_impl.rs create mode 100644 tests/ui/unpin_impl.stderr diff --git a/tests/ui/unpin_impl.rs b/tests/ui/unpin_impl.rs new file mode 100644 index 000000000..129fcb11d --- /dev/null +++ b/tests/ui/unpin_impl.rs @@ -0,0 +1,10 @@ +#[cxx::bridge] +mod ffi { + extern "C++" { + type Opaque; + } +} + +impl Unpin for ffi::Opaque {} + +fn main() {} diff --git a/tests/ui/unpin_impl.stderr b/tests/ui/unpin_impl.stderr new file mode 100644 index 000000000..afe5a8066 --- /dev/null +++ b/tests/ui/unpin_impl.stderr @@ -0,0 +1,18 @@ +error[E0282]: type annotations needed + --> tests/ui/unpin_impl.rs:4:14 + | +4 | type Opaque; + | ^^^^^^ cannot infer type + +error[E0283]: type annotations needed + --> tests/ui/unpin_impl.rs:1:1 + | +1 | #[cxx::bridge] + | ^^^^^^^^^^^^^^ cannot infer type + | +note: multiple `impl`s satisfying `ffi::Opaque: __AmbiguousIfImpl<_>` found + --> tests/ui/unpin_impl.rs:1:1 + | +1 | #[cxx::bridge] + | ^^^^^^^^^^^^^^ + = note: this error originates in the attribute macro `cxx::bridge` (in Nightly builds, run with -Z macro-backtrace for more info) From 13633c3388f90270d1ba7944fd69e53e44ecedf2 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 8 Nov 2022 11:13:08 -0800 Subject: [PATCH 2/3] Update unpin_impl ui test to nightly-2022-06-12 --- tests/ui/unpin_impl.stderr | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/ui/unpin_impl.stderr b/tests/ui/unpin_impl.stderr index afe5a8066..b77ee8e56 100644 --- a/tests/ui/unpin_impl.stderr +++ b/tests/ui/unpin_impl.stderr @@ -1,14 +1,20 @@ error[E0282]: type annotations needed - --> tests/ui/unpin_impl.rs:4:14 + --> tests/ui/unpin_impl.rs:1:1 + | +1 | #[cxx::bridge] + | ^^^^^^^^^^^^^^ cannot infer type of the type parameter `Self` declared on the trait `__AmbiguousIfImpl` | -4 | type Opaque; - | ^^^^^^ cannot infer type + = note: this error originates in the attribute macro `cxx::bridge` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider specifying the generic argument + | +1 | #[cxx::bridge]::<_> + | +++++ error[E0283]: type annotations needed --> tests/ui/unpin_impl.rs:1:1 | 1 | #[cxx::bridge] - | ^^^^^^^^^^^^^^ cannot infer type + | ^^^^^^^^^^^^^^ cannot infer type of the type parameter `Self` declared on the trait `__AmbiguousIfImpl` | note: multiple `impl`s satisfying `ffi::Opaque: __AmbiguousIfImpl<_>` found --> tests/ui/unpin_impl.rs:1:1 @@ -16,3 +22,7 @@ note: multiple `impl`s satisfying `ffi::Opaque: __AmbiguousIfImpl<_>` found 1 | #[cxx::bridge] | ^^^^^^^^^^^^^^ = note: this error originates in the attribute macro `cxx::bridge` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider specifying the generic argument + | +1 | #[cxx::bridge]::<_> + | +++++ From 930e0de803c308651ef9601c9b67b08b3c2f0643 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 8 Nov 2022 11:19:34 -0800 Subject: [PATCH 3/3] Update unpin_impl ui test to nightly-2022-10-06 --- tests/ui/unpin_impl.stderr | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tests/ui/unpin_impl.stderr b/tests/ui/unpin_impl.stderr index b77ee8e56..18099bb66 100644 --- a/tests/ui/unpin_impl.stderr +++ b/tests/ui/unpin_impl.stderr @@ -5,10 +5,6 @@ error[E0282]: type annotations needed | ^^^^^^^^^^^^^^ cannot infer type of the type parameter `Self` declared on the trait `__AmbiguousIfImpl` | = note: this error originates in the attribute macro `cxx::bridge` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider specifying the generic argument - | -1 | #[cxx::bridge]::<_> - | +++++ error[E0283]: type annotations needed --> tests/ui/unpin_impl.rs:1:1 @@ -22,7 +18,3 @@ note: multiple `impl`s satisfying `ffi::Opaque: __AmbiguousIfImpl<_>` found 1 | #[cxx::bridge] | ^^^^^^^^^^^^^^ = note: this error originates in the attribute macro `cxx::bridge` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider specifying the generic argument - | -1 | #[cxx::bridge]::<_> - | +++++