@@ -106,15 +106,19 @@ impl<'a> FmtStrs<'a> {
106
106
Variable => ( "variable" ,
107
107
vec ! ( "id" , "name" , "qualname" , "value" , "type" , "scopeid" ) ,
108
108
true , true ) ,
109
- Enum => ( "enum" , vec ! ( "id" , "qualname" , "scopeid" ) , true , true ) ,
110
- Variant => ( "variant" , vec ! ( "id" , "name" , "qualname" , "value" , "scopeid" ) , true , true ) ,
109
+ Enum => ( "enum" , vec ! ( "id" , "qualname" , "scopeid" , "value" ) , true , true ) ,
110
+ Variant => ( "variant" ,
111
+ vec ! ( "id" , "name" , "qualname" , "type" , "value" , "scopeid" ) ,
112
+ true , true ) ,
111
113
VariantStruct => ( "variant_struct" ,
112
- vec ! ( "id" , "ctor_id" , "qualname" , "value" , "scopeid" ) , true , true ) ,
113
- Function => ( "function" , vec ! ( "id" , "qualname" , "declid" , "declidcrate" , "scopeid" ) ,
114
+ vec ! ( "id" , "ctor_id" , "qualname" , "type" , "value" , "scopeid" ) ,
115
+ true , true ) ,
116
+ Function => ( "function" ,
117
+ vec ! ( "id" , "qualname" , "declid" , "declidcrate" , "scopeid" ) ,
114
118
true , true ) ,
115
119
MethodDecl => ( "method_decl" , vec ! ( "id" , "qualname" , "scopeid" ) , true , true ) ,
116
- Struct => ( "struct" , vec ! ( "id" , "ctor_id" , "qualname" , "scopeid" ) , true , true ) ,
117
- Trait => ( "trait" , vec ! ( "id" , "qualname" , "scopeid" ) , true , true ) ,
120
+ Struct => ( "struct" , vec ! ( "id" , "ctor_id" , "qualname" , "scopeid" , "value" ) , true , true ) ,
121
+ Trait => ( "trait" , vec ! ( "id" , "qualname" , "scopeid" , "value" ) , true , true ) ,
118
122
Impl => ( "impl" , vec ! ( "id" , "refid" , "refidcrate" , "scopeid" ) , true , true ) ,
119
123
Module => ( "module" , vec ! ( "id" , "qualname" , "scopeid" , "def_file" ) , true , false ) ,
120
124
UseAlias => ( "use_alias" ,
@@ -128,7 +132,7 @@ impl<'a> FmtStrs<'a> {
128
132
true , false ) ,
129
133
MethodCall => ( "method_call" ,
130
134
vec ! ( "refid" , "refidcrate" , "declid" , "declidcrate" , "scopeid" ) ,
131
- true , true ) ,
135
+ true , true ) ,
132
136
Typedef => ( "typedef" , vec ! ( "id" , "qualname" , "value" ) , true , true ) ,
133
137
ExternalCrate => ( "external_crate" , vec ! ( "name" , "crate" , "file_name" ) , false , false ) ,
134
138
Crate => ( "crate" , vec ! ( "name" ) , true , false ) ,
@@ -140,7 +144,7 @@ impl<'a> FmtStrs<'a> {
140
144
true , true ) ,
141
145
StructRef => ( "struct_ref" ,
142
146
vec ! ( "refid" , "refidcrate" , "qualname" , "scopeid" ) ,
143
- true , true ) ,
147
+ true , true ) ,
144
148
FnRef => ( "fn_ref" , vec ! ( "refid" , "refidcrate" , "qualname" , "scopeid" ) , true , true )
145
149
}
146
150
}
@@ -157,6 +161,7 @@ impl<'a> FmtStrs<'a> {
157
161
}
158
162
159
163
let values = values. iter ( ) . map ( |s| {
164
+ // Never take more than 1020 chars
160
165
if s. len ( ) > 1020 {
161
166
s. as_slice ( ) . slice_to ( 1020 )
162
167
} else {
@@ -323,11 +328,12 @@ impl<'a> FmtStrs<'a> {
323
328
sub_span : Option < Span > ,
324
329
id : NodeId ,
325
330
name : & str ,
326
- scope_id : NodeId ) {
331
+ scope_id : NodeId ,
332
+ value : & str ) {
327
333
self . check_and_record ( Enum ,
328
334
span,
329
335
sub_span,
330
- svec ! ( id, name, scope_id) ) ;
336
+ svec ! ( id, name, scope_id, value ) ) ;
331
337
}
332
338
333
339
pub fn tuple_variant_str ( & mut self ,
@@ -336,12 +342,13 @@ impl<'a> FmtStrs<'a> {
336
342
id : NodeId ,
337
343
name : & str ,
338
344
qualname : & str ,
345
+ typ : & str ,
339
346
val : & str ,
340
347
scope_id : NodeId ) {
341
348
self . check_and_record ( Variant ,
342
349
span,
343
350
sub_span,
344
- svec ! ( id, name, qualname, val, scope_id) ) ;
351
+ svec ! ( id, name, qualname, typ , val, scope_id) ) ;
345
352
}
346
353
347
354
pub fn struct_variant_str ( & mut self ,
@@ -350,12 +357,13 @@ impl<'a> FmtStrs<'a> {
350
357
id : NodeId ,
351
358
ctor_id : NodeId ,
352
359
name : & str ,
360
+ typ : & str ,
353
361
val : & str ,
354
362
scope_id : NodeId ) {
355
363
self . check_and_record ( VariantStruct ,
356
364
span,
357
365
sub_span,
358
- svec ! ( id, ctor_id, name, val, scope_id) ) ;
366
+ svec ! ( id, ctor_id, name, typ , val, scope_id) ) ;
359
367
}
360
368
361
369
pub fn fn_str ( & mut self ,
@@ -405,23 +413,25 @@ impl<'a> FmtStrs<'a> {
405
413
id : NodeId ,
406
414
ctor_id : NodeId ,
407
415
name : & str ,
408
- scope_id : NodeId ) {
416
+ scope_id : NodeId ,
417
+ value : & str ) {
409
418
self . check_and_record ( Struct ,
410
419
span,
411
420
sub_span,
412
- svec ! ( id, ctor_id, name, scope_id) ) ;
421
+ svec ! ( id, ctor_id, name, scope_id, value ) ) ;
413
422
}
414
423
415
424
pub fn trait_str ( & mut self ,
416
425
span : Span ,
417
426
sub_span : Option < Span > ,
418
427
id : NodeId ,
419
428
name : & str ,
420
- scope_id : NodeId ) {
429
+ scope_id : NodeId ,
430
+ value : & str ) {
421
431
self . check_and_record ( Trait ,
422
432
span,
423
433
sub_span,
424
- svec ! ( id, name, scope_id) ) ;
434
+ svec ! ( id, name, scope_id, value ) ) ;
425
435
}
426
436
427
437
pub fn impl_str ( & mut self ,
0 commit comments