mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-11-03 13:13:18 +00:00 
			
		
		
		
	fix regression_11688_3
This commit is contained in:
		
							parent
							
								
									e30747dfa8
								
							
						
					
					
						commit
						4fe0545bb6
					
				@ -205,7 +205,7 @@ impl<'a> TyLoweringContext<'a> {
 | 
			
		||||
                    len,
 | 
			
		||||
                    self.type_param_mode,
 | 
			
		||||
                    || self.generics(),
 | 
			
		||||
                    DebruijnIndex::INNERMOST,
 | 
			
		||||
                    self.in_binders,
 | 
			
		||||
                );
 | 
			
		||||
 | 
			
		||||
                TyKind::Array(inner_ty, const_len).intern(Interner)
 | 
			
		||||
@ -728,7 +728,7 @@ impl<'a> TyLoweringContext<'a> {
 | 
			
		||||
                            c,
 | 
			
		||||
                            self.type_param_mode,
 | 
			
		||||
                            || self.generics(),
 | 
			
		||||
                            DebruijnIndex::INNERMOST,
 | 
			
		||||
                            self.in_binders,
 | 
			
		||||
                        )
 | 
			
		||||
                    },
 | 
			
		||||
                ) {
 | 
			
		||||
 | 
			
		||||
@ -1477,3 +1477,23 @@ fn regression_11688_2() {
 | 
			
		||||
        "#,
 | 
			
		||||
    );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[test]
 | 
			
		||||
fn regression_11688_3() {
 | 
			
		||||
    check_types(
 | 
			
		||||
        r#"
 | 
			
		||||
        //- minicore: iterator
 | 
			
		||||
        struct Ar<T, const N: u8>(T);
 | 
			
		||||
        fn f<const LEN: usize, T, const BASE: u8>(
 | 
			
		||||
            num_zeros: usize,
 | 
			
		||||
        ) -> dyn Iterator<Item = [Ar<T, BASE>; LEN]> {
 | 
			
		||||
            loop {}
 | 
			
		||||
        }
 | 
			
		||||
        fn dynamic_programming() {
 | 
			
		||||
            for board in f::<9, u8, 7>(1) {
 | 
			
		||||
              //^^^^^ [Ar<u8, 7>; 9]
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        "#,
 | 
			
		||||
    );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user