diff --git a/src/Psalm/Internal/Codebase/Functions.php b/src/Psalm/Internal/Codebase/Functions.php
index <HASH>..<HASH> 100644
--- a/src/Psalm/Internal/Codebase/Functions.php
+++ b/src/Psalm/Internal/Codebase/Functions.php
@@ -472,7 +472,7 @@ class Functions
             'ldap_set_option',
 
             // iterators
-            'rewind', 'iterator_apply',
+            'rewind', 'iterator_apply', 'iterator_to_array',
 
             // mysqli
             'mysqli_select_db', 'mysqli_dump_debug_info', 'mysqli_kill', 'mysqli_multi_query',
diff --git a/tests/Template/ConditionalReturnTypeTest.php b/tests/Template/ConditionalReturnTypeTest.php
index <HASH>..<HASH> 100644
--- a/tests/Template/ConditionalReturnTypeTest.php
+++ b/tests/Template/ConditionalReturnTypeTest.php
@@ -793,7 +793,6 @@ class ConditionalReturnTypeTest extends TestCase
             'conditionalArrayValues' => [
                 '<?php
                     /**
-                     * @psalm-pure
                      * @template TValue
                      * @template TIterable of ?iterable<TValue>
                      * @param TIterable $iterable
Marked iterator_to_array as an impure function (#<I>)