mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 07:10:29 +00:00
Add test of unsupported elided lifetime in extern Rust sig
This commit is contained in:
parent
5f8a70472a
commit
464d3fc0ac
20
tests/ui/unsupported_elided.rs
Normal file
20
tests/ui/unsupported_elided.rs
Normal 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() {}
|
Loading…
Reference in New Issue
Block a user