Add test of extern Rust type with lifetime

This commit is contained in:
David Tolnay 2021-01-02 23:47:23 -08:00
parent 58183e2228
commit 5b9bbdf861
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -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()