Add ui test of explicit impl trait for type

This commit is contained in:
David Tolnay 2020-10-04 00:19:09 -07:00
parent 2b3c2b2fa4
commit 64cab48688
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#[cxx::bridge]
mod ffi {
struct S {
x: u8,
}
impl UniquePtrTarget for S {}
}
fn main() {}

View File

@ -0,0 +1,5 @@
error: unexpected impl, expected something like `impl UniquePtr<T> {}`
--> $DIR/impl_trait_for_type.rs:7:10
|
7 | impl UniquePtrTarget for S {}
| ^^^^^^^^^^^^^^^^^^^^^