File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,20 @@ fn deserialize_span<D>(_d: D) -> span {
31
31
type spanned < T > = { node : T , span : span } ;
32
32
33
33
fn serialize_ident < S : serializer > ( s : S , i : ident ) {
34
- let intr = unsafe { task:: local_data_get ( parse:: token:: interner_key) } ;
34
+ let intr = match unsafe { task:: local_data_get ( parse:: token:: interner_key) } {
35
+ none => fail ~"serialization: TLS interner not set up",
36
+ some( intr) => intr
37
+ } ;
35
38
36
- s. emit_str ( * ( * intr. get ( ) ) . get ( i) ) ;
39
+ s. emit_str ( * ( * intr) . get ( i) ) ;
37
40
}
38
41
fn deserialize_ident < D : deserializer > ( d : D ) -> ident {
39
- let intr = unsafe { task:: local_data_get ( parse:: token:: interner_key) } ;
42
+ let intr = match unsafe { task:: local_data_get ( parse:: token:: interner_key) } {
43
+ none => fail ~"deserialization: TLS interner not set up",
44
+ some( intr) => intr
45
+ } ;
40
46
41
- ( * intr. get ( ) ) . intern ( @d. read_str ( ) )
47
+ ( * intr) . intern ( @d. read_str ( ) )
42
48
}
43
49
44
50
type ident = token:: str_num ;
You can’t perform that action at this time.
0 commit comments