Files
rust/tests/ui
bors e1607e9d31 Auto merge of #8912 - Alexendoo:needless-late-init-ice, r=giraffate
needless_late_init: fix ICE when all branches return the never type

Fixes #8911

When the assignment is done in a match guard or the if condition and all of the branches return the never type `assignment_suggestions` would return an empty `Vec` which caused the ICE. It now returns `None` in that scenario

Also moves some tests to the top of the file

changelog: ICE Fixes: [`needless_late_init`] #8911
2022-05-31 00:46:52 +00:00
..
2022-05-27 16:44:02 -04:00
2021-12-13 00:00:51 +00:00
2021-12-13 00:00:51 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2020-11-08 18:32:12 -05:00
2021-08-11 14:21:33 +00:00
fix
2022-05-18 00:37:12 +09:00
fix
2022-05-27 01:30:44 +09:00
2020-01-07 18:38:12 +09:00
2019-12-21 16:20:30 +01:00
2021-08-11 14:21:33 +00:00
2021-12-13 00:00:51 +00:00
2021-12-13 00:00:51 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2019-11-07 17:11:06 +01:00
2019-11-07 17:11:06 +01:00
2019-11-07 17:11:06 +01:00
2019-11-07 17:11:06 +01:00
2019-11-07 17:11:06 +01:00
2020-01-12 19:54:17 +08:00
2020-01-12 19:54:17 +08:00
2020-02-23 22:36:15 -08:00
2021-08-11 14:21:33 +00:00
2021-12-13 17:09:16 +00:00
2022-05-25 09:08:25 +09:00
2022-05-25 09:08:25 +09:00
2020-04-20 15:47:08 -04:00
2020-01-07 18:38:12 +09:00
2019-12-24 03:06:52 +07:00
2019-12-24 03:06:52 +07:00
2020-11-08 18:32:12 -05:00
2019-10-15 09:58:11 +02:00
2020-01-26 07:01:16 +09:00
2020-01-07 18:38:12 +09:00
2021-08-11 14:21:33 +00:00
2020-01-14 08:32:33 +09:00
2022-02-24 22:55:40 +03:00
2022-02-24 22:55:40 +03:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2022-05-24 14:42:08 +02:00
2021-08-11 14:21:33 +00:00
2020-01-07 18:38:12 +09:00
2021-08-11 14:21:33 +00:00
2020-04-26 18:00:51 +03:00
2020-01-07 18:38:12 +09:00
2019-12-31 09:22:35 -08:00
2021-08-11 14:21:33 +00:00
2021-06-04 08:05:54 -04:00
2021-12-13 00:00:51 +00:00
2021-12-13 00:00:51 +00:00
2021-08-11 14:21:33 +00:00
2022-05-25 09:08:25 +09:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2022-03-30 20:13:16 +02:00
2020-01-26 07:01:16 +09:00
2020-01-07 18:38:12 +09:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2019-12-18 18:59:43 +02:00
2022-05-30 22:46:31 +02:00
2020-01-20 10:56:02 +09:00
2019-10-15 09:58:11 +02:00
2019-10-15 09:58:11 +02:00
2020-09-10 15:23:38 +02:00
2021-12-12 12:34:21 +00:00
2021-12-12 12:34:21 +00:00
2020-11-08 18:32:12 -05:00
2021-07-27 16:26:50 -04:00
2021-07-27 16:26:50 -04:00
2019-11-25 18:12:52 +03:00
2019-11-25 18:12:52 +03:00
2020-01-07 18:38:12 +09:00
fix
2022-05-10 23:54:42 +09:00
fix
2022-05-10 23:54:42 +09:00
2019-12-27 22:07:55 +09:00
2019-12-27 22:07:55 +09:00
2022-05-27 15:18:46 -04:00
2022-05-27 15:18:46 -04:00
2021-03-03 11:23:29 +01:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2020-01-07 18:38:12 +09:00
2022-04-17 11:03:34 +02:00
2020-03-10 18:00:37 -04:00
2020-03-10 18:00:37 -04:00
2019-10-02 22:38:00 +07:00