Skip to content

Commit f952196

Browse files
authored
Merge pull request #1130 from dtolnay/unpinimpl
Restore unpin_impl.rs UI test after `need_type_info` ICE has been fixed
2 parents 544b350 + 930e0de commit f952196

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

tests/ui/unpin_impl.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#[cxx::bridge]
2+
mod ffi {
3+
extern "C++" {
4+
type Opaque;
5+
}
6+
}
7+
8+
impl Unpin for ffi::Opaque {}
9+
10+
fn main() {}

tests/ui/unpin_impl.stderr

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
error[E0282]: type annotations needed
2+
--> tests/ui/unpin_impl.rs:1:1
3+
|
4+
1 | #[cxx::bridge]
5+
| ^^^^^^^^^^^^^^ cannot infer type of the type parameter `Self` declared on the trait `__AmbiguousIfImpl`
6+
|
7+
= note: this error originates in the attribute macro `cxx::bridge` (in Nightly builds, run with -Z macro-backtrace for more info)
8+
9+
error[E0283]: type annotations needed
10+
--> tests/ui/unpin_impl.rs:1:1
11+
|
12+
1 | #[cxx::bridge]
13+
| ^^^^^^^^^^^^^^ cannot infer type of the type parameter `Self` declared on the trait `__AmbiguousIfImpl`
14+
|
15+
note: multiple `impl`s satisfying `ffi::Opaque: __AmbiguousIfImpl<_>` found
16+
--> tests/ui/unpin_impl.rs:1:1
17+
|
18+
1 | #[cxx::bridge]
19+
| ^^^^^^^^^^^^^^
20+
= note: this error originates in the attribute macro `cxx::bridge` (in Nightly builds, run with -Z macro-backtrace for more info)

0 commit comments

Comments
 (0)