File tree Expand file tree Collapse file tree 6 files changed +14
-14
lines changed Expand file tree Collapse file tree 6 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ rust_test(
7
7
rust_library (
8
8
name = "ffi" ,
9
9
srcs = [
10
+ "ffi/alias.rs" ,
10
11
"ffi/lib.rs" ,
11
- "ffi/module.rs" ,
12
12
],
13
13
crate = "cxx_test_suite" ,
14
14
deps = [
@@ -21,8 +21,8 @@ cxx_library(
21
21
name = "impl" ,
22
22
srcs = [
23
23
"ffi/tests.cc" ,
24
+ ":gen-alias-source" ,
24
25
":gen-lib-source" ,
25
- ":gen-module-source" ,
26
26
],
27
27
header_namespace = "cxx-test-suite" ,
28
28
headers = {
@@ -47,8 +47,8 @@ genrule(
47
47
)
48
48
49
49
genrule (
50
- name = "gen-module -source" ,
51
- srcs = ["ffi/module .rs" ],
52
- out = "module .rs.cc" ,
50
+ name = "gen-alias -source" ,
51
+ srcs = ["ffi/alias .rs" ],
52
+ out = "alias .rs.cc" ,
53
53
cmd = "$(exe //:codegen) ${SRCS} > ${OUT}" ,
54
54
)
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ rust_test(
9
9
rust_library (
10
10
name = "cxx_test_suite" ,
11
11
srcs = [
12
+ "ffi/alias.rs" ,
12
13
"ffi/lib.rs" ,
13
- "ffi/module.rs" ,
14
14
],
15
15
deps = [
16
16
":impl" ,
@@ -22,8 +22,8 @@ cc_library(
22
22
name = "impl" ,
23
23
srcs = [
24
24
"ffi/tests.cc" ,
25
+ ":gen-alias-source" ,
25
26
":gen-lib-source" ,
26
- ":gen-module-source" ,
27
27
],
28
28
hdrs = ["ffi/tests.h" ],
29
29
include_prefix = "cxx-test-suite" ,
@@ -57,9 +57,9 @@ cc_library(
57
57
)
58
58
59
59
genrule (
60
- name = "gen-module -source" ,
61
- srcs = ["ffi/module .rs" ],
62
- outs = ["module .rs.cc" ],
60
+ name = "gen-alias -source" ,
61
+ srcs = ["ffi/alias .rs" ],
62
+ outs = ["alias .rs.cc" ],
63
63
cmd = "$(location //:codegen) $< > $@" ,
64
64
tools = ["//:codegen" ],
65
65
)
File renamed without changes.
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ fn main() {
3
3
return ;
4
4
}
5
5
6
- let sources = vec ! [ "lib .rs" , "module .rs" ] ;
6
+ let sources = vec ! [ "alias .rs" , "lib .rs" ] ;
7
7
cxx_build:: bridges ( sources)
8
8
. file ( "tests.cc" )
9
9
. flag_if_supported ( cxxbridge_flags:: STD )
Original file line number Diff line number Diff line change 4
4
clippy:: trivially_copy_pass_by_ref
5
5
) ]
6
6
7
- pub mod module ;
7
+ pub mod alias ;
8
8
9
9
use cxx:: { CxxString , UniquePtr } ;
10
10
use std:: fmt:: { self , Display } ;
Original file line number Diff line number Diff line change 1
- use cxx_test_suite:: ffi;
1
+ use cxx_test_suite:: { alias , ffi} ;
2
2
use std:: cell:: Cell ;
3
3
use std:: ffi:: CStr ;
4
4
@@ -89,7 +89,7 @@ fn test_c_take() {
89
89
check ! ( ffi:: c_take_shared( ffi:: Shared { z: 2020 } ) ) ;
90
90
check ! ( ffi:: c_take_box( Box :: new( 2020 ) ) ) ;
91
91
check ! ( ffi:: c_take_ref_c( & unique_ptr) ) ;
92
- check ! ( cxx_test_suite :: module :: ffi:: c_take_unique_ptr( unique_ptr) ) ;
92
+ check ! ( alias :: ffi:: c_take_unique_ptr( unique_ptr) ) ;
93
93
check ! ( ffi:: c_take_str( "2020" ) ) ;
94
94
check ! ( ffi:: c_take_sliceu8( b"2020" ) ) ;
95
95
check ! ( ffi:: c_take_rust_string( "2020" . to_owned( ) ) ) ;
You can’t perform that action at this time.
0 commit comments