mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 07:10:29 +00:00
Add ui test of explicit impl trait for type
This commit is contained in:
parent
2b3c2b2fa4
commit
64cab48688
10
tests/ui/impl_trait_for_type.rs
Normal file
10
tests/ui/impl_trait_for_type.rs
Normal file
@ -0,0 +1,10 @@
|
||||
#[cxx::bridge]
|
||||
mod ffi {
|
||||
struct S {
|
||||
x: u8,
|
||||
}
|
||||
|
||||
impl UniquePtrTarget for S {}
|
||||
}
|
||||
|
||||
fn main() {}
|
5
tests/ui/impl_trait_for_type.stderr
Normal file
5
tests/ui/impl_trait_for_type.stderr
Normal 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 {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
Loading…
Reference in New Issue
Block a user