Skip to content

Commit 64cab48

Browse files
committed
Add ui test of explicit impl trait for type
1 parent 2b3c2b2 commit 64cab48

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

tests/ui/impl_trait_for_type.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#[cxx::bridge]
2+
mod ffi {
3+
struct S {
4+
x: u8,
5+
}
6+
7+
impl UniquePtrTarget for S {}
8+
}
9+
10+
fn main() {}

tests/ui/impl_trait_for_type.stderr

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
error: unexpected impl, expected something like `impl UniquePtr<T> {}`
2+
--> $DIR/impl_trait_for_type.rs:7:10
3+
|
4+
7 | impl UniquePtrTarget for S {}
5+
| ^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)