mirror of
https://github.com/topjohnwu/cxx.git
synced 2025-02-22 09:01:23 +00:00
Add test of extern Rust type with lifetime
This commit is contained in:
parent
58183e2228
commit
5b9bbdf861
@ -210,6 +210,11 @@ pub mod ffi {
|
||||
type Job = crate::module::ffi::Job;
|
||||
}
|
||||
|
||||
extern "Rust" {
|
||||
#[derive(ExternType)]
|
||||
type Reference<'a>;
|
||||
}
|
||||
|
||||
unsafe extern "C++" {
|
||||
type Borrow<'a>;
|
||||
|
||||
@ -377,6 +382,8 @@ impl R {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Reference<'a>(&'a String);
|
||||
|
||||
impl ffi::Shared {
|
||||
fn r_method_on_shared(&self) -> String {
|
||||
"2020".to_owned()
|
||||
|
Loading…
x
Reference in New Issue
Block a user