@@ -19,8 +19,6 @@ use crate::{
1919 server_impl:: literal_from_str,
2020} ;
2121
22- pub struct FreeFunctions ;
23-
2422pub struct RaSpanServer < ' a > {
2523 // FIXME: Report this back to the caller to track as dependencies
2624 pub tracked_env_vars : HashMap < Box < str > , Option < Box < str > > > ,
@@ -33,13 +31,28 @@ pub struct RaSpanServer<'a> {
3331}
3432
3533impl server:: Types for RaSpanServer < ' _ > {
36- type FreeFunctions = FreeFunctions ;
3734 type TokenStream = crate :: token_stream:: TokenStream < Span > ;
3835 type Span = Span ;
3936 type Symbol = Symbol ;
4037}
4138
42- impl server:: FreeFunctions for RaSpanServer < ' _ > {
39+ impl server:: Server for RaSpanServer < ' _ > {
40+ fn globals ( & mut self ) -> ExpnGlobals < Self :: Span > {
41+ ExpnGlobals {
42+ def_site : self . def_site ,
43+ call_site : self . call_site ,
44+ mixed_site : self . mixed_site ,
45+ }
46+ }
47+
48+ fn intern_symbol ( ident : & str ) -> Self :: Symbol {
49+ Symbol :: intern ( ident)
50+ }
51+
52+ fn with_symbol_string ( symbol : & Self :: Symbol , f : impl FnOnce ( & str ) ) {
53+ f ( symbol. as_str ( ) )
54+ }
55+
4356 fn injected_env_var ( & mut self , _: & str ) -> Option < std:: string:: String > {
4457 None
4558 }
@@ -276,21 +289,3 @@ impl server::FreeFunctions for RaSpanServer<'_> {
276289 Ok ( <Self as server:: Server >:: intern_symbol ( string) )
277290 }
278291}
279-
280- impl server:: Server for RaSpanServer < ' _ > {
281- fn globals ( & mut self ) -> ExpnGlobals < Self :: Span > {
282- ExpnGlobals {
283- def_site : self . def_site ,
284- call_site : self . call_site ,
285- mixed_site : self . mixed_site ,
286- }
287- }
288-
289- fn intern_symbol ( ident : & str ) -> Self :: Symbol {
290- Symbol :: intern ( ident)
291- }
292-
293- fn with_symbol_string ( symbol : & Self :: Symbol , f : impl FnOnce ( & str ) ) {
294- f ( symbol. as_str ( ) )
295- }
296- }
0 commit comments