mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-31 03:54:42 +00:00 
			
		
		
		
	Rollup merge of #137334 - compiler-errors:edition-2024-fresh-2, r=saethlin,traviscross
Greatly simplify lifetime captures in edition 2024 Remove most of the `+ Captures` and `+ '_` from the compiler, since they are now unnecessary with the new edition 2021 lifetime capture rules. Use some `+ 'tcx` and `+ 'static` rather than being overly verbose with precise capturing syntax.
This commit is contained in:
		
						commit
						001a4019df
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		|  | @ -361,11 +361,11 @@ impl PatCx for MatchCheckCtx<'_> { | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     fn ctor_sub_tys<'a>( |     fn ctor_sub_tys( | ||||||
|         &'a self, |         &self, | ||||||
|         ctor: &'a rustc_pattern_analysis::constructor::Constructor<Self>, |         ctor: &rustc_pattern_analysis::constructor::Constructor<Self>, | ||||||
|         ty: &'a Self::Ty, |         ty: &Self::Ty, | ||||||
|     ) -> impl ExactSizeIterator<Item = (Self::Ty, PrivateUninhabitedField)> + Captures<'a> { |     ) -> impl ExactSizeIterator<Item = (Self::Ty, PrivateUninhabitedField)> { | ||||||
|         let single = |ty| smallvec![(ty, PrivateUninhabitedField(false))]; |         let single = |ty| smallvec![(ty, PrivateUninhabitedField(false))]; | ||||||
|         let tys: SmallVec<[_; 2]> = match ctor { |         let tys: SmallVec<[_; 2]> = match ctor { | ||||||
|             Struct | Variant(_) | UnionField => match ty.kind(Interner) { |             Struct | Variant(_) | UnionField => match ty.kind(Interner) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jacob Pratt
						Jacob Pratt