mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-10-31 13:04:42 +00:00 
			
		
		
		
	 9fce3dc685
			
		
	
	
		9fce3dc685
		
			
		
	
	
	
	
		
			
			Fix insufficient logic when searching for the underlying allocation This PR fixes the logic inside the `invalid_reference_casting` lint, when trying to lint on bigger memory layout casts. More specifically when looking for the "underlying allocation" we were wrongly assuming that when we got `&mut slice[index]` that `slice[index]` was the allocation, but it's not. Fixes https://github.com/rust-lang/rust/issues/124685