Add ui tests of extern type lifetime parsing

This commit is contained in:
David Tolnay 2020-12-28 19:37:47 -08:00
parent e81647ffda
commit fecb988491
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
4 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,8 @@
#[cxx::bridge]
mod ffi {
extern "C++" {
type Generic<T>;
}
}
fn main() {}

View File

@ -0,0 +1,11 @@
error: extern type with generic type parameter is not supported yet
--> $DIR/extern_type_generic.rs:4:22
|
4 | type Generic<T>;
| ^
error: expected `=` or `:`
--> $DIR/extern_type_generic.rs:4:24
|
4 | type Generic<T>;
| ^

View File

@ -0,0 +1,8 @@
#[cxx::bridge]
mod ffi {
extern "C++" {
type Complex<'a, 'b: 'a>;
}
}
fn main() {}

View File

@ -0,0 +1,11 @@
error: lifetime parameter with bounds is not supported yet
--> $DIR/extern_type_lifetime_bound.rs:4:26
|
4 | type Complex<'a, 'b: 'a>;
| ^^^^^^
error: expected `=` or `:`
--> $DIR/extern_type_lifetime_bound.rs:4:33
|
4 | type Complex<'a, 'b: 'a>;
| ^