Add ui test of invalid nonempty impl block

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

View File

@ -0,0 +1,12 @@
#[cxx::bridge]
mod ffi {
struct S {
x: u8,
}
impl UniquePtr<S> {
fn new() -> Self;
}
}
fn main() {}

View 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 | | }
| |_____^