mirror of
https://github.com/topjohnwu/cxx.git
synced 2025-02-23 17:40:53 +00:00
Add ui test of struct cycle
This commit is contained in:
parent
acae7a6aae
commit
07b7c13bc8
30
tests/ui/struct_cycle.rs
Normal file
30
tests/ui/struct_cycle.rs
Normal file
@ -0,0 +1,30 @@
|
||||
#[cxx::bridge]
|
||||
mod ffi {
|
||||
struct Node0 {
|
||||
i: i32,
|
||||
}
|
||||
|
||||
struct Node1 {
|
||||
node2: Node2,
|
||||
vec: Vec<Node3>,
|
||||
}
|
||||
|
||||
struct Node2 {
|
||||
node4: Node4,
|
||||
}
|
||||
|
||||
struct Node3 {
|
||||
node1: Node1,
|
||||
}
|
||||
|
||||
struct Node4 {
|
||||
node0: Node0,
|
||||
node5: Node5,
|
||||
}
|
||||
|
||||
struct Node5 {
|
||||
node2: Node2,
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
5
tests/ui/struct_cycle.stderr
Normal file
5
tests/ui/struct_cycle.stderr
Normal file
@ -0,0 +1,5 @@
|
||||
error: unsupported cyclic data structure
|
||||
--> $DIR/struct_cycle.rs:26:9
|
||||
|
|
||||
26 | node2: Node2,
|
||||
| ^^^^^^^^^^^^
|
Loading…
x
Reference in New Issue
Block a user