File tree 4 files changed +14
-11
lines changed
4 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,12 @@ cfg-if = "0.1.0"
29
29
clang-sys = { version = " 0.12" , features = [" runtime" , " clang_3_9" ] }
30
30
lazy_static = " 0.2.1"
31
31
rustc-serialize = " 0.3.19"
32
- syntex_syntax = " 0.50 "
32
+ syntex_syntax = " 0.54 "
33
33
regex = " 0.2"
34
34
35
35
[dependencies .aster ]
36
36
features = [" with-syntex" ]
37
- version = " 0.34 "
37
+ version = " 0.38 "
38
38
39
39
[dependencies .env_logger ]
40
40
optional = true
@@ -46,7 +46,7 @@ version = "0.3"
46
46
47
47
[dependencies .quasi ]
48
48
features = [" with-syntex" ]
49
- version = " 0.26 "
49
+ version = " 0.29 "
50
50
51
51
[features ]
52
52
assert_no_dangling_items = []
Original file line number Diff line number Diff line change @@ -153,16 +153,15 @@ pub mod ast_ty {
153
153
}
154
154
155
155
pub fn float_expr ( f : f64 ) -> P < ast:: Expr > {
156
- use aster:: str :: ToInternedString ;
156
+ use aster:: symbol :: ToSymbol ;
157
157
let mut string = f. to_string ( ) ;
158
158
159
159
// So it gets properly recognised as a floating point constant.
160
160
if !string. contains ( '.' ) {
161
161
string. push ( '.' ) ;
162
162
}
163
163
164
- let interned_str = string. as_str ( ) . to_interned_string ( ) ;
165
- let kind = ast:: LitKind :: FloatUnsuffixed ( interned_str) ;
164
+ let kind = ast:: LitKind :: FloatUnsuffixed ( string. as_str ( ) . to_symbol ( ) ) ;
166
165
aster:: AstBuilder :: new ( ) . expr ( ) . lit ( ) . build_lit ( kind)
167
166
}
168
167
Original file line number Diff line number Diff line change @@ -1863,16 +1863,19 @@ impl ToRustTy for Type {
1863
1863
if let ast:: TyKind :: Path ( _, ref mut path) = inner_ty. node {
1864
1864
let template_args = template_args. iter ( )
1865
1865
. map ( |arg| arg. to_rust_ty ( ctx) )
1866
- . collect ( ) ;
1866
+ . collect :: < Vec < _ > > ( ) ;
1867
1867
1868
- path. segments . last_mut ( ) . unwrap ( ) . parameters =
1869
- ast:: PathParameters :: AngleBracketed (
1868
+ path. segments . last_mut ( ) . unwrap ( ) . parameters = if template_args. is_empty ( ) {
1869
+ None
1870
+ } else {
1871
+ Some ( P ( ast:: PathParameters :: AngleBracketed (
1870
1872
ast:: AngleBracketedParameterData {
1871
1873
lifetimes : vec ! [ ] ,
1872
1874
types : P :: from_vec ( template_args) ,
1873
1875
bindings : P :: from_vec ( vec ! [ ] ) ,
1874
1876
}
1875
- ) ;
1877
+ ) ) )
1878
+ }
1876
1879
}
1877
1880
1878
1881
P ( inner_ty)
Original file line number Diff line number Diff line change @@ -461,6 +461,7 @@ impl<'ctx> BindgenContext<'ctx> {
461
461
pub fn gen < F , Out > ( & mut self , cb : F ) -> Out
462
462
where F : FnOnce ( & Self ) -> Out ,
463
463
{
464
+ use aster:: symbol:: ToSymbol ;
464
465
use syntax:: ext:: expand:: ExpansionConfig ;
465
466
use syntax:: codemap:: { ExpnInfo , MacroBang , NameAndSpan } ;
466
467
use syntax:: ext:: base;
@@ -475,7 +476,7 @@ impl<'ctx> BindgenContext<'ctx> {
475
476
ctx. 0 . bt_push ( ExpnInfo {
476
477
call_site : self . span ,
477
478
callee : NameAndSpan {
478
- format : MacroBang ( parse :: token :: intern ( "" ) ) ,
479
+ format : MacroBang ( "" . to_symbol ( ) ) ,
479
480
allow_internal_unstable : false ,
480
481
span : None ,
481
482
} ,
You can’t perform that action at this time.
0 commit comments