bors
e0b25c5a64
Auto merge of #11998 - cocodery:fix/issue11762, r=llogiq
...
Check whether out of bound when access a known length array with a constant index
fixes [Issue#11762](https://github.com/rust-lang/rust-clippy/issues/11762 )
Issue#11762 points that `Array references with known length are not flagged when indexed out of bounds`.
To fix this problem, it is needed to add check for `Expr::Index`. We expand this issue include reference and direct accessing a array.
When we access a array with a constant index `off`, and already know the length `size`, if `off >= size`, these code will throw an error, instead rustc's lint checking them or runtime panic happening.
changelog: [`out_of_bound_indexing`]: Add check for illegal accessing known length array with a constant index
2023-12-22 17:01:17 +00:00
..
2023-12-16 17:40:32 +01:00
2023-12-16 17:40:32 +01:00
2023-12-22 20:31:48 +08:00
2023-12-13 01:16:12 +02:00
2023-12-15 22:52:38 +03:00
2023-12-15 22:52:38 +03:00
2023-12-01 18:21:58 +01:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-12-21 18:20:25 +08:00
2023-12-21 18:20:25 +08:00
2023-12-21 18:20:25 +08:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-16 17:40:32 +01:00
2023-12-16 17:40:32 +01:00
2023-12-16 17:40:32 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-10 15:36:31 -05:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-22 20:31:48 +08:00
2023-12-22 20:31:48 +08:00
2023-12-22 20:31:48 +08:00
2023-12-16 17:40:32 +01:00
2023-12-16 17:40:32 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-22 20:31:48 +08:00
2023-12-22 20:31:48 +08:00
2023-12-12 14:56:35 +01:00
2023-12-12 14:56:35 +01:00
2023-12-12 14:56:35 +01:00
2023-12-08 17:21:30 +01:00
2023-12-08 17:21:30 +01:00
2023-11-28 10:28:55 +08:00
2023-11-28 10:28:55 +08:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 09:14:56 +01:00
2023-12-01 09:14:56 +01:00
2023-12-16 17:40:32 +01:00
2023-12-16 17:40:32 +01:00
2023-12-16 17:40:32 +01:00
2023-11-30 15:41:54 +08:00
2023-11-30 15:41:54 +08:00
2023-12-10 15:36:31 -05:00
2023-12-10 15:36:31 -05:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-06 12:17:48 +08:00
2023-12-06 12:17:48 +08:00
2023-12-16 17:40:32 +01:00
2023-12-16 17:40:32 +01:00
2023-12-01 18:21:58 +01:00
2023-12-16 00:43:52 +01:00
2023-12-16 00:43:52 +01:00
2023-12-16 00:43:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-03 10:38:46 +09:00
2023-12-03 10:38:46 +09:00
2023-12-03 10:38:46 +09:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-16 17:40:32 +01:00
2023-12-16 17:40:32 +01:00
2023-12-16 17:40:32 +01:00
2023-12-02 19:44:36 +00:00
2023-12-16 13:59:56 +01:00
2023-12-16 13:59:56 +01:00
2023-12-16 13:59:56 +01:00
2023-12-01 17:24:34 +01:00
2023-12-01 16:52:34 +01:00
2023-12-01 17:24:34 +01:00
2023-12-16 00:43:52 +01:00
2023-12-16 00:43:52 +01:00
2023-12-16 00:43:52 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:06:03 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-16 18:45:24 +01:00
2023-12-16 18:45:24 +01:00
2023-12-08 17:21:30 +01:00
2023-12-08 17:21:30 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-08 21:33:28 +08:00
2023-12-08 21:33:28 +08:00
2023-12-08 21:33:28 +08:00
2023-12-11 13:52:55 -05:00
2023-12-11 13:52:55 -05:00
2023-12-11 13:52:55 -05:00
2023-12-10 15:36:31 -05:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-01 18:21:58 +01:00
2023-12-12 08:47:22 -08:00
2023-12-12 08:47:22 -08:00
2023-12-12 08:47:22 -08:00