mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-26 01:38:22 +00:00 
			
		
		
		
	Merge pull request #20667 from ChayimFriedman2/ns-cleanup2
	
		
			
	
		
	
	
		
	
		
			Some checks are pending
		
		
	
	
		
			
				
	
				metrics / build_metrics (push) Waiting to run
				
			
		
			
				
	
				metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
				
			
		
			
				
	
				metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
				
			
		
			
				
	
				metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
				
			
		
			
				
	
				metrics / other_metrics (self) (push) Blocked by required conditions
				
			
		
			
				
	
				metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
				
			
		
			
				
	
				metrics / generate_final_metrics (push) Blocked by required conditions
				
			
		
			
				
	
				rustdoc / rustdoc (push) Waiting to run
				
			
		
		
	
	
				
					
				
			
		
			Some checks are pending
		
		
	
	metrics / build_metrics (push) Waiting to run
				
			metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
				
			metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
				
			metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
				
			metrics / other_metrics (self) (push) Blocked by required conditions
				
			metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
				
			metrics / generate_final_metrics (push) Blocked by required conditions
				
			rustdoc / rustdoc (push) Waiting to run
				
			internal: Add Regression Test For The One And The Only Issue #5514
This commit is contained in:
		
						commit
						622b2675db
					
				
					 1 changed files with 34 additions and 0 deletions
				
			
		|  | @ -128,6 +128,40 @@ trait T2: Sized { | ||||||
|     ); |     ); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | #[test] | ||||||
|  | fn regression_type_checker_does_not_eagerly_select_predicates_from_where_clauses() { | ||||||
|  |     // This was a very long standing issue (#5514) with a lot of duplicates, that was
 | ||||||
|  |     // fixed by the switch to the new trait solver, so it deserves a long name and a
 | ||||||
|  |     // honorable mention.
 | ||||||
|  |     check_infer( | ||||||
|  |         r#" | ||||||
|  | //- minicore: from
 | ||||||
|  | 
 | ||||||
|  | struct Foo; | ||||||
|  | impl Foo { | ||||||
|  |     fn method(self) -> i32 { 0 } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | fn f<T: Into<Foo>>(u: T) { | ||||||
|  |     let x = u.into(); | ||||||
|  |     x.method(); | ||||||
|  | } | ||||||
|  |     "#,
 | ||||||
|  |         expect![[r#" | ||||||
|  |             38..42 'self': Foo | ||||||
|  |             51..56 '{ 0 }': i32 | ||||||
|  |             53..54 '0': i32 | ||||||
|  |             79..80 'u': T | ||||||
|  |             85..126 '{     ...d(); }': () | ||||||
|  |             95..96 'x': Foo | ||||||
|  |             99..100 'u': T | ||||||
|  |             99..107 'u.into()': Foo | ||||||
|  |             113..114 'x': Foo | ||||||
|  |             113..123 'x.method()': i32 | ||||||
|  |         "#]],
 | ||||||
|  |     ); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| #[test] | #[test] | ||||||
| fn opaque_generics() { | fn opaque_generics() { | ||||||
|     check_infer( |     check_infer( | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Chayim Refael Friedman
						Chayim Refael Friedman