mirror of
https://github.com/topjohnwu/cxx.git
synced 2024-11-27 13:50:24 +00:00
Add ui test of extern function with body
This commit is contained in:
parent
fb5e1bad32
commit
a22b7decff
8
tests/ui/function_with_body.rs
Normal file
8
tests/ui/function_with_body.rs
Normal file
@ -0,0 +1,8 @@
|
||||
#[cxx::bridge]
|
||||
mod ffi {
|
||||
unsafe extern "C++" {
|
||||
fn f() {}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
5
tests/ui/function_with_body.stderr
Normal file
5
tests/ui/function_with_body.stderr
Normal file
@ -0,0 +1,5 @@
|
||||
error: unsupported foreign item
|
||||
--> $DIR/function_with_body.rs:4:9
|
||||
|
|
||||
4 | fn f() {}
|
||||
| ^^^^^^^^^
|
Loading…
Reference in New Issue
Block a user