File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -525,12 +525,12 @@ impl<I: Interner> Zip<I> for FnSubst<I> {
525525 ) -> Fallible < ( ) > {
526526 let interner = zipper. interner ( ) ;
527527 // Parameters
528- for ( a , b ) in a . 0 . as_slice ( interner ) [ ..a . 0 . len ( interner ) - 1 ]
529- . iter ( )
530- . zip ( b . 0 . as_slice ( interner ) [ ..b . 0 . len ( interner ) - 1 ] . iter ( ) )
531- {
532- Zip :: zip_with ( zipper , variance . xform ( Variance :: Contravariant ) , a , b ) ? ;
533- }
528+ Zip :: zip_with (
529+ zipper ,
530+ variance . xform ( Variance :: Contravariant ) ,
531+ & a . 0 . as_slice ( interner ) [ ..a . 0 . len ( interner ) - 1 ] ,
532+ & b . 0 . as_slice ( interner ) [ ..b . 0 . len ( interner ) - 1 ] ,
533+ ) ? ;
534534 // Return type
535535 Zip :: zip_with (
536536 zipper,
Original file line number Diff line number Diff line change @@ -149,6 +149,13 @@ fn forall_equality() {
149149 expect![ [ "Unique" ] ]
150150 }
151151
152+ goal {
153+ // Function pointers with different parameters should not be equal.
154+ fn ( u32 ) : Eq <fn ( u32 , u32 ) >
155+ } yields {
156+ expect![ [ "No possible solution" ] ]
157+ }
158+
152159 goal {
153160 // Variadic function pointers should not be equal to non-variadic fn pointers.
154161 fn ( u8 , ...) : Eq <fn ( u8 ) >
You can’t perform that action at this time.
0 commit comments