We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5b4a15 commit 1124355Copy full SHA for 1124355
rust/ql/test/library-tests/sensitivedata/test.rs
@@ -345,3 +345,18 @@ fn test_private_info(
345
346
sink(ContactDetails::FavouriteColor("blue".to_string()));
347
}
348
+
349
+struct MyArray {
350
+ data: [i32; 10],
351
+}
352
353
+impl MyArray {
354
+ fn from_trusted_iterator(iter: impl Iterator<Item = i32>) -> Self {
355
+ MyArray { data: [0; 10] }
356
+ }
357
358
359
+fn test_iterator() {
360
+ let iter = std::iter::repeat(1).take(10);
361
+ sink(MyArray::from_trusted_iterator(iter)); // $ SPURIOUS: sensitive=secret
362
0 commit comments