@@ -268,12 +268,12 @@ pub struct TokenStreamIter {
268268}
269269
270270#[ derive( Default ) ]
271- pub struct Rustc {
271+ pub struct RustAnalyzer {
272272 ident_interner : IdentInterner ,
273273 // FIXME: store span information here.
274274}
275275
276- impl server:: Types for Rustc {
276+ impl server:: Types for RustAnalyzer {
277277 type FreeFunctions = FreeFunctions ;
278278 type TokenStream = TokenStream ;
279279 type TokenStreamBuilder = TokenStreamBuilder ;
@@ -288,15 +288,15 @@ impl server::Types for Rustc {
288288 type MultiSpan = Vec < Span > ;
289289}
290290
291- impl server:: FreeFunctions for Rustc {
291+ impl server:: FreeFunctions for RustAnalyzer {
292292 fn track_env_var ( & mut self , _var : & str , _value : Option < & str > ) {
293293 // FIXME: track env var accesses
294294 // https://github.com/rust-lang/rust/pull/71858
295295 }
296296 fn track_path ( & mut self , _path : & str ) { }
297297}
298298
299- impl server:: TokenStream for Rustc {
299+ impl server:: TokenStream for RustAnalyzer {
300300 fn new ( & mut self ) -> Self :: TokenStream {
301301 Self :: TokenStream :: new ( )
302302 }
@@ -354,7 +354,7 @@ impl server::TokenStream for Rustc {
354354 }
355355}
356356
357- impl server:: TokenStreamBuilder for Rustc {
357+ impl server:: TokenStreamBuilder for RustAnalyzer {
358358 fn new ( & mut self ) -> Self :: TokenStreamBuilder {
359359 Self :: TokenStreamBuilder :: new ( )
360360 }
@@ -366,7 +366,7 @@ impl server::TokenStreamBuilder for Rustc {
366366 }
367367}
368368
369- impl server:: TokenStreamIter for Rustc {
369+ impl server:: TokenStreamIter for RustAnalyzer {
370370 fn next (
371371 & mut self ,
372372 iter : & mut Self :: TokenStreamIter ,
@@ -415,7 +415,7 @@ fn spacing_to_external(spacing: Spacing) -> bridge::Spacing {
415415 }
416416}
417417
418- impl server:: Group for Rustc {
418+ impl server:: Group for RustAnalyzer {
419419 fn new ( & mut self , delimiter : bridge:: Delimiter , stream : Self :: TokenStream ) -> Self :: Group {
420420 Self :: Group { delimiter : delim_to_internal ( delimiter) , token_trees : stream. token_trees }
421421 }
@@ -449,7 +449,7 @@ impl server::Group for Rustc {
449449 }
450450}
451451
452- impl server:: Punct for Rustc {
452+ impl server:: Punct for RustAnalyzer {
453453 fn new ( & mut self , ch : char , spacing : bridge:: Spacing ) -> Self :: Punct {
454454 tt:: Punct {
455455 char : ch,
@@ -471,7 +471,7 @@ impl server::Punct for Rustc {
471471 }
472472}
473473
474- impl server:: Ident for Rustc {
474+ impl server:: Ident for RustAnalyzer {
475475 fn new ( & mut self , string : & str , span : Self :: Span , _is_raw : bool ) -> Self :: Ident {
476476 IdentId ( self . ident_interner . intern ( & IdentData ( tt:: Ident { text : string. into ( ) , id : span } ) ) )
477477 }
@@ -486,7 +486,7 @@ impl server::Ident for Rustc {
486486 }
487487}
488488
489- impl server:: Literal for Rustc {
489+ impl server:: Literal for RustAnalyzer {
490490 fn debug_kind ( & mut self , _literal : & Self :: Literal ) -> String {
491491 // r-a: debug_kind and suffix are unsupported; corresponding client code has been changed to not call these.
492492 // They must still be present to be ABI-compatible and work with upstream proc_macro.
@@ -597,7 +597,7 @@ impl server::Literal for Rustc {
597597 }
598598}
599599
600- impl server:: SourceFile for Rustc {
600+ impl server:: SourceFile for RustAnalyzer {
601601 // FIXME these are all stubs
602602 fn eq ( & mut self , _file1 : & Self :: SourceFile , _file2 : & Self :: SourceFile ) -> bool {
603603 true
@@ -610,7 +610,7 @@ impl server::SourceFile for Rustc {
610610 }
611611}
612612
613- impl server:: Diagnostic for Rustc {
613+ impl server:: Diagnostic for RustAnalyzer {
614614 fn new ( & mut self , level : Level , msg : & str , spans : Self :: MultiSpan ) -> Self :: Diagnostic {
615615 let mut diag = Diagnostic :: new ( level, msg) ;
616616 diag. spans = spans;
@@ -634,7 +634,7 @@ impl server::Diagnostic for Rustc {
634634 }
635635}
636636
637- impl server:: Span for Rustc {
637+ impl server:: Span for RustAnalyzer {
638638 fn debug ( & mut self , span : Self :: Span ) -> String {
639639 format ! ( "{:?}" , span. 0 )
640640 }
@@ -706,7 +706,7 @@ impl server::Span for Rustc {
706706 }
707707}
708708
709- impl server:: MultiSpan for Rustc {
709+ impl server:: MultiSpan for RustAnalyzer {
710710 fn new ( & mut self ) -> Self :: MultiSpan {
711711 // FIXME handle span
712712 vec ! [ ]
@@ -724,8 +724,8 @@ mod tests {
724724 use super :: * ;
725725
726726 #[ test]
727- fn test_rustc_server_literals ( ) {
728- let mut srv = Rustc { ident_interner : IdentInterner :: default ( ) } ;
727+ fn test_ra_server_literals ( ) {
728+ let mut srv = RustAnalyzer { ident_interner : IdentInterner :: default ( ) } ;
729729 assert_eq ! ( srv. integer( "1234" ) . text, "1234" ) ;
730730
731731 assert_eq ! ( srv. typed_integer( "12" , "u8" ) . text, "12u8" ) ;
@@ -761,7 +761,7 @@ mod tests {
761761 }
762762
763763 #[ test]
764- fn test_rustc_server_to_string ( ) {
764+ fn test_ra_server_to_string ( ) {
765765 let s = TokenStream {
766766 token_trees : vec ! [
767767 tt:: TokenTree :: Leaf ( tt:: Leaf :: Ident ( tt:: Ident {
@@ -786,7 +786,7 @@ mod tests {
786786 }
787787
788788 #[ test]
789- fn test_rustc_server_from_str ( ) {
789+ fn test_ra_server_from_str ( ) {
790790 use std:: str:: FromStr ;
791791 let subtree_paren_a = tt:: TokenTree :: Subtree ( tt:: Subtree {
792792 delimiter : Some ( tt:: Delimiter {
0 commit comments