Skip to content

Commit 464d3fc

Browse files
committed
Add test of unsupported elided lifetime in extern Rust sig
1 parent 5f8a704 commit 464d3fc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/ui/unsupported_elided.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
use std::marker::PhantomData;
2+
3+
#[cxx::bridge]
4+
mod ffi {
5+
extern "Rust" {
6+
type T;
7+
8+
fn f(t: &T) -> &str;
9+
}
10+
}
11+
12+
pub struct T<'a> {
13+
_lifetime: PhantomData<&'a ()>,
14+
}
15+
16+
fn f<'a>(_t: &T<'a>) -> &'a str {
17+
""
18+
}
19+
20+
fn main() {}

0 commit comments

Comments
 (0)