Add ui test of extern function with body

This commit is contained in:
David Tolnay 2021-01-03 20:08:37 -08:00
parent fb5e1bad32
commit a22b7decff
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,8 @@
#[cxx::bridge]
mod ffi {
unsafe extern "C++" {
fn f() {}
}
}
fn main() {}

View File

@ -0,0 +1,5 @@
error: unsupported foreign item
--> $DIR/function_with_body.rs:4:9
|
4 | fn f() {}
| ^^^^^^^^^