mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 15:19:44 +00:00
Test include parsing
This commit is contained in:
parent
91e87fa51e
commit
cf96664b29
12
tests/ui/include.rs
Normal file
12
tests/ui/include.rs
Normal file
@ -0,0 +1,12 @@
|
||||
#[cxx::bridge]
|
||||
mod ffi {
|
||||
extern "C" {
|
||||
include!("path/to" what);
|
||||
include!(<path/to> what);
|
||||
include!(<path/to);
|
||||
include!(<path[to]>);
|
||||
include!(...);
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
29
tests/ui/include.stderr
Normal file
29
tests/ui/include.stderr
Normal file
@ -0,0 +1,29 @@
|
||||
error: unexpected token
|
||||
--> $DIR/include.rs:4:28
|
||||
|
|
||||
4 | include!("path/to" what);
|
||||
| ^^^^
|
||||
|
||||
error: unexpected token
|
||||
--> $DIR/include.rs:5:28
|
||||
|
|
||||
5 | include!(<path/to> what);
|
||||
| ^^^^
|
||||
|
||||
error: expected `>`
|
||||
--> $DIR/include.rs:6:17
|
||||
|
|
||||
6 | include!(<path/to);
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: unexpected token in include path
|
||||
--> $DIR/include.rs:7:23
|
||||
|
|
||||
7 | include!(<path[to]>);
|
||||
| ^^^^
|
||||
|
||||
error: expected "quoted/path/to" or <bracketed/path/to>
|
||||
--> $DIR/include.rs:8:18
|
||||
|
|
||||
8 | include!(...);
|
||||
| ^^^
|
Loading…
Reference in New Issue
Block a user