@@ -17,8 +17,9 @@ pub struct Cursor {
17
17
18
18
impl fmt:: Debug for Cursor {
19
19
fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
20
- write ! ( fmt, "Cursor({} kind: {}, loc: {}, usr: {:?})" ,
21
- self . spelling( ) , kind_to_str( self . kind( ) ) , self . location( ) , self . usr( ) )
20
+ write ! ( fmt, "Cursor({} kind: {} ({}), loc: {}, usr: {:?})" ,
21
+ self . spelling( ) , kind_to_str( self . kind( ) ) , self . kind( ) ,
22
+ self . location( ) , self . usr( ) )
22
23
}
23
24
}
24
25
@@ -211,19 +212,10 @@ impl Cursor {
211
212
}
212
213
}
213
214
214
- #[ cfg( not( feature="llvm_stable" ) ) ]
215
215
pub fn is_inlined_function ( & self ) -> bool {
216
216
unsafe { clang_Cursor_isFunctionInlined ( self . x ) != 0 }
217
217
}
218
218
219
- // TODO: Remove this when LLVM 3.9 is released.
220
- //
221
- // This is currently used for CI purposes.
222
- #[ cfg( feature="llvm_stable" ) ]
223
- pub fn is_inlined_function ( & self ) -> bool {
224
- false
225
- }
226
-
227
219
// bitfield
228
220
pub fn bit_width ( & self ) -> Option < u32 > {
229
221
unsafe {
@@ -392,9 +384,9 @@ impl Eq for Type {}
392
384
393
385
impl fmt:: Debug for Type {
394
386
fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
395
- write ! ( fmt, "Type({}, kind: {}, decl: {:?}, canon: {:?})" ,
396
- self . spelling( ) , type_to_str( self . kind( ) ) , self . declaration ( ) ,
397
- self . declaration( ) . canonical( ) )
387
+ write ! ( fmt, "Type({}, kind: {} ({}) , decl: {:?}, canon: {:?})" ,
388
+ self . spelling( ) , type_to_str( self . kind( ) ) , self . kind ( ) ,
389
+ self . declaration( ) , self . declaration ( ) . canonical( ) )
398
390
}
399
391
}
400
392
@@ -573,7 +565,6 @@ impl Type {
573
565
}
574
566
}
575
567
576
- #[ cfg( not( feature="llvm_stable" ) ) ]
577
568
pub fn named ( & self ) -> Type {
578
569
unsafe {
579
570
Type { x : clang_Type_getNamedType ( self . x ) }
@@ -1093,9 +1084,7 @@ pub fn type_to_str(x: Enum_CXTypeKind) -> &'static str {
1093
1084
CXType_VariableArray => "VariableArray" ,
1094
1085
CXType_DependentSizedArray => "DependentSizedArray" ,
1095
1086
CXType_MemberPointer => "MemberPointer" ,
1096
- #[ cfg( not( feature="llvm_stable" ) ) ]
1097
1087
CXType_Auto => "Auto" ,
1098
- #[ cfg( not( feature="llvm_stable" ) ) ]
1099
1088
CXType_Elaborated => "Elaborated" ,
1100
1089
_ => "?"
1101
1090
}
0 commit comments