• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #![deny(elided_lifetimes_in_paths)]
2 
3 #[cxx::bridge]
4 mod ffi {
5     #[derive(PartialEq, PartialOrd, Hash)]
6     struct Struct<'a> {
7         reference: &'a i32,
8     }
9 
10     extern "Rust" {
11         type Rust<'a>;
12     }
13 
14     unsafe extern "C++" {
15         type Cpp<'a>;
16 
lifetime_named<'a>(s: &'a i32) -> UniquePtr<Cpp<'a>>17         fn lifetime_named<'a>(s: &'a i32) -> UniquePtr<Cpp<'a>>;
18 
lifetime_underscore(s: &i32) -> UniquePtr<Cpp<'_>>19         fn lifetime_underscore(s: &i32) -> UniquePtr<Cpp<'_>>;
20 
lifetime_elided(s: &i32) -> UniquePtr<Cpp>21         fn lifetime_elided(s: &i32) -> UniquePtr<Cpp>;
22     }
23 }
24 
25 pub struct Rust<'a>(&'a i32);
26 
main()27 fn main() {}
28