Skip to content

Commit 2b3c2b2

Browse files
committed
Add ui test of invalid nonempty impl block
1 parent 50b7563 commit 2b3c2b2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tests/ui/nonempty_impl_block.rs

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

tests/ui/nonempty_impl_block.stderr

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
error: expected an empty impl block
2+
--> $DIR/nonempty_impl_block.rs:7:23
3+
|
4+
7 | impl UniquePtr<S> {
5+
| _______________________^
6+
8 | | fn new() -> Self;
7+
9 | | }
8+
| |_____^

0 commit comments

Comments
 (0)