mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-27 01:11:38 +00:00
Add ui test of invalid nonempty impl block
This commit is contained in:
parent
50b7563de4
commit
2b3c2b2fa4
12
tests/ui/nonempty_impl_block.rs
Normal file
12
tests/ui/nonempty_impl_block.rs
Normal file
@ -0,0 +1,12 @@
|
||||
#[cxx::bridge]
|
||||
mod ffi {
|
||||
struct S {
|
||||
x: u8,
|
||||
}
|
||||
|
||||
impl UniquePtr<S> {
|
||||
fn new() -> Self;
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
8
tests/ui/nonempty_impl_block.stderr
Normal file
8
tests/ui/nonempty_impl_block.stderr
Normal file
@ -0,0 +1,8 @@
|
||||
error: expected an empty impl block
|
||||
--> $DIR/nonempty_impl_block.rs:7:23
|
||||
|
|
||||
7 | impl UniquePtr<S> {
|
||||
| _______________________^
|
||||
8 | | fn new() -> Self;
|
||||
9 | | }
|
||||
| |_____^
|
Loading…
Reference in New Issue
Block a user