File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,10 @@ libloading = "0.5"
20
20
lazy_static = " 1.0"
21
21
failure = " 0.1"
22
22
libc = " 0.2"
23
-
24
- [dependencies .llvm-sys ]
25
- version = " 60"
26
- features = [" no-llvm-linking" ]
23
+ llvm-sys = { version = " 70" , features = [" no-llvm-linking" ] }
27
24
28
25
[build-dependencies ]
29
26
cargo_metadata = " 0.6"
30
27
failure = " 0.1"
31
28
quote = " 0.6"
32
-
33
- [build-dependencies .syn ]
34
- version = " 0.14"
35
- features = [" full" ]
29
+ syn = { version = " 0.15" , features = [" full" ] }
Original file line number Diff line number Diff line change @@ -133,14 +133,17 @@ mod llvm {
133
133
Ok ( llvm_lib_rs_path. parent ( ) . unwrap ( ) . into ( ) )
134
134
}
135
135
136
- fn extract_file_declarations ( & self , path : & Path ) -> Result < Vec < Declaration > , Error > {
136
+ fn extract_file_declarations ( & self , path : & Path )
137
+ -> Result < Vec < Declaration > , Error > {
137
138
let mut file = File :: open ( path)
138
- . map_err ( |_| format_err ! ( "Unable to open file: {}" , path. to_str( ) . unwrap( ) ) ) ?;
139
+ . map_err ( |_| format_err ! ( "Unable to open file: {}" ,
140
+ path. to_str( ) . unwrap( ) ) ) ?;
139
141
140
142
let mut content = String :: new ( ) ;
141
143
file. read_to_string ( & mut content) ?;
142
144
143
- let ast = parse_file ( & content) ?;
145
+ let ast = parse_file ( & content)
146
+ . map_err ( |e| failure:: err_msg ( e. to_string ( ) ) ) ?;
144
147
145
148
Ok ( ast. items . iter ( ) . fold ( vec ! [ ] , |mut list, item| match item {
146
149
Item :: ForeignMod ( ref item) if item. abi . is_c ( ) => {
You can’t perform that action at this time.
0 commit comments