mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-30 03:27:44 +00:00 
			
		
		
		
	chore: Remove support for concat_idents!
				
					
				
			`concat_idents!` was deprecated in [1] and will be removed in the near future. rust-analyzer's support is independent of rustc's, so drop RA support now to make syncing easier. [1]: https://github.com/rust-lang/rust/pull/137653
This commit is contained in:
		
							parent
							
								
									4f7af13637
								
							
						
					
					
						commit
						e6e5e3cc41
					
				
					 3 changed files with 0 additions and 44 deletions
				
			
		|  | @ -509,24 +509,6 @@ fn main() { "s"; } | ||||||
|     ); |     ); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #[test] |  | ||||||
| fn test_concat_idents_expand() { |  | ||||||
|     check( |  | ||||||
|         r##" |  | ||||||
| #[rustc_builtin_macro] |  | ||||||
| macro_rules! concat_idents {} |  | ||||||
| 
 |  | ||||||
| fn main() { concat_idents!(foo, bar); } |  | ||||||
| "##,
 |  | ||||||
|         expect![[r##" |  | ||||||
| #[rustc_builtin_macro] |  | ||||||
| macro_rules! concat_idents {} |  | ||||||
| 
 |  | ||||||
| fn main() { foobar; } |  | ||||||
| "##]],
 |  | ||||||
|     ); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| #[test] | #[test] | ||||||
| fn test_quote_string() { | fn test_quote_string() { | ||||||
|     check( |     check( | ||||||
|  |  | ||||||
|  | @ -140,7 +140,6 @@ register_builtin! { | ||||||
|     EagerExpander: |     EagerExpander: | ||||||
|     (compile_error, CompileError) => compile_error_expand, |     (compile_error, CompileError) => compile_error_expand, | ||||||
|     (concat, Concat) => concat_expand, |     (concat, Concat) => concat_expand, | ||||||
|     (concat_idents, ConcatIdents) => concat_idents_expand, |  | ||||||
|     (concat_bytes, ConcatBytes) => concat_bytes_expand, |     (concat_bytes, ConcatBytes) => concat_bytes_expand, | ||||||
|     (include, Include) => include_expand, |     (include, Include) => include_expand, | ||||||
|     (include_bytes, IncludeBytes) => include_bytes_expand, |     (include_bytes, IncludeBytes) => include_bytes_expand, | ||||||
|  | @ -660,30 +659,6 @@ fn concat_bytes_expand_subtree( | ||||||
|     Ok(()) |     Ok(()) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| fn concat_idents_expand( |  | ||||||
|     _db: &dyn ExpandDatabase, |  | ||||||
|     _arg_id: MacroCallId, |  | ||||||
|     tt: &tt::TopSubtree, |  | ||||||
|     span: Span, |  | ||||||
| ) -> ExpandResult<tt::TopSubtree> { |  | ||||||
|     let mut err = None; |  | ||||||
|     let mut ident = String::new(); |  | ||||||
|     for (i, t) in tt.iter().enumerate() { |  | ||||||
|         match t { |  | ||||||
|             TtElement::Leaf(tt::Leaf::Ident(id)) => { |  | ||||||
|                 ident.push_str(id.sym.as_str()); |  | ||||||
|             } |  | ||||||
|             TtElement::Leaf(tt::Leaf::Punct(punct)) if i % 2 == 1 && punct.char == ',' => (), |  | ||||||
|             _ => { |  | ||||||
|                 err.get_or_insert(ExpandError::other(span, "unexpected token")); |  | ||||||
|             } |  | ||||||
|         } |  | ||||||
|     } |  | ||||||
|     // FIXME merge spans
 |  | ||||||
|     let ident = tt::Ident { sym: Symbol::intern(&ident), span, is_raw: tt::IdentIsRaw::No }; |  | ||||||
|     ExpandResult { value: quote!(span =>#ident), err } |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| fn relative_file( | fn relative_file( | ||||||
|     db: &dyn ExpandDatabase, |     db: &dyn ExpandDatabase, | ||||||
|     call_id: MacroCallId, |     call_id: MacroCallId, | ||||||
|  |  | ||||||
|  | @ -164,7 +164,6 @@ define_symbols! { | ||||||
|     completion, |     completion, | ||||||
|     compile_error, |     compile_error, | ||||||
|     concat_bytes, |     concat_bytes, | ||||||
|     concat_idents, |  | ||||||
|     concat, |     concat, | ||||||
|     const_format_args, |     const_format_args, | ||||||
|     const_panic_fmt, |     const_panic_fmt, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Trevor Gross
						Trevor Gross