mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-31 12:04:43 +00:00 
			
		
		
		
	Fix #[rustc_deprecated_safe_2024]
It should be considered by the edition of the caller, not the callee. Technically we still don't do it correctly - we need the span of the method name (if it comes from a macro), but we don't keep it and this is good enough for now.
This commit is contained in:
		
							parent
							
								
									6862329068
								
							
						
					
					
						commit
						55c63abc59
					
				
					 16 changed files with 274 additions and 100 deletions
				
			
		|  | @ -1107,16 +1107,9 @@ impl SourceAnalyzer { | |||
|             if let Some(expanded_expr) = sm.macro_expansion_expr(macro_expr) { | ||||
|                 let mut is_unsafe = false; | ||||
|                 let mut walk_expr = |expr_id| { | ||||
|                     unsafe_expressions( | ||||
|                         db, | ||||
|                         infer, | ||||
|                         *def, | ||||
|                         body, | ||||
|                         expr_id, | ||||
|                         &mut |_, inside_unsafe_block, _| { | ||||
|                             is_unsafe |= inside_unsafe_block == InsideUnsafeBlock::No | ||||
|                         }, | ||||
|                     ) | ||||
|                     unsafe_expressions(db, infer, *def, body, expr_id, &mut |inside_unsafe_block| { | ||||
|                         is_unsafe |= inside_unsafe_block == InsideUnsafeBlock::No | ||||
|                     }) | ||||
|                 }; | ||||
|                 match expanded_expr { | ||||
|                     ExprOrPatId::ExprId(expanded_expr) => walk_expr(expanded_expr), | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Chayim Refael Friedman
						Chayim Refael Friedman