mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 07:10:29 +00:00
Add ui tests of extern type lifetime parsing
This commit is contained in:
parent
e81647ffda
commit
fecb988491
8
tests/ui/extern_type_generic.rs
Normal file
8
tests/ui/extern_type_generic.rs
Normal file
@ -0,0 +1,8 @@
|
||||
#[cxx::bridge]
|
||||
mod ffi {
|
||||
extern "C++" {
|
||||
type Generic<T>;
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
11
tests/ui/extern_type_generic.stderr
Normal file
11
tests/ui/extern_type_generic.stderr
Normal 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>;
|
||||
| ^
|
8
tests/ui/extern_type_lifetime_bound.rs
Normal file
8
tests/ui/extern_type_lifetime_bound.rs
Normal file
@ -0,0 +1,8 @@
|
||||
#[cxx::bridge]
|
||||
mod ffi {
|
||||
extern "C++" {
|
||||
type Complex<'a, 'b: 'a>;
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
11
tests/ui/extern_type_lifetime_bound.stderr
Normal file
11
tests/ui/extern_type_lifetime_bound.stderr
Normal 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>;
|
||||
| ^
|
Loading…
Reference in New Issue
Block a user