Add test of unsupported elided lifetime in extern Rust sig

This commit is contained in:
David Tolnay 2020-11-09 20:13:54 -08:00
parent 5f8a70472a
commit 464d3fc0ac
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -0,0 +1,20 @@
use std::marker::PhantomData;
#[cxx::bridge]
mod ffi {
extern "Rust" {
type T;
fn f(t: &T) -> &str;
}
}
pub struct T<'a> {
_lifetime: PhantomData<&'a ()>,
}
fn f<'a>(_t: &T<'a>) -> &'a str {
""
}
fn main() {}