mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-31 03:54:42 +00:00 
			
		
		
		
	fix: Properly calculate the layouts of tuple ptrs whose last fields are DST
This commit is contained in:
		
							parent
							
								
									32fa60f3a6
								
							
						
					
					
						commit
						b07a76d6af
					
				
					 2 changed files with 19 additions and 0 deletions
				
			
		|  | @ -388,6 +388,15 @@ fn struct_tail_erasing_lifetimes(db: &dyn HirDatabase, pointee: Ty) -> Ty { | |||
|                 None => pointee, | ||||
|             } | ||||
|         } | ||||
|         TyKind::Tuple(_, subst) => { | ||||
|             if let Some(last_field_ty) = | ||||
|                 subst.iter(Interner).last().and_then(|arg| arg.ty(Interner)) | ||||
|             { | ||||
|                 struct_tail_erasing_lifetimes(db, last_field_ty.clone()) | ||||
|             } else { | ||||
|                 pointee | ||||
|             } | ||||
|         } | ||||
|         _ => pointee, | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Shoyu Vanilla
						Shoyu Vanilla