Jubilee
4db9554358
Rollup merge of #142302 - JonathanBrouwer:invalid-const-token, r=jdonszelmann
...
Rework how the disallowed qualifier in function type diagnostics are generated
This pull request fixes two independent issues:
1. When qualifiers of a function type ptr are in the wrong order and one of them is async/const (not permitted on function types), the diagnostic suggests removing the incorrect qualifier. Fixes https://github.com/rust-lang/rust/issues/142268 , which is an issue created by https://github.com/rust-lang/rust/pull/133151 . This is fixed by moving the check into `parse_fn_front_matter`, where better span information is available to generate the right suggestions.
2. When qualifiers of a function type ptr are in the wrong order and one of them is async/const (not permitted on function types), `cargo fix` crashes because "cannot replace slice of data that was already replaced". This is fixed by not generating a suggestion for the "wrong order" diagnostic if the "disallowed qualifier" diagnostic is triggered.
There is a commit with failing tests so the test diff is clearer
r? `@jdonszelmann`
2025-06-13 20:59:17 -07:00
..
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-08 23:06:31 +03:00
2025-06-03 11:45:58 +02:00
2025-06-12 07:57:12 +00:00
2025-06-11 17:11:58 +02:00
2025-04-08 23:06:31 +03:00
2025-06-13 18:13:34 +02:00
2025-04-08 23:06:31 +03:00
2025-06-13 18:13:34 +02:00
2025-06-13 18:13:34 +02:00
2025-06-13 18:13:34 +02:00
2025-04-16 22:44:02 +03:00
2025-06-11 17:11:58 +02:00
2025-06-11 17:11:58 +02:00
2025-06-03 13:28:38 +02:00
2025-04-18 15:57:29 +02:00
2025-04-17 19:45:28 +08:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-18 15:57:29 +02:00
2025-05-07 22:56:14 +08:00
2025-05-07 22:56:14 +08:00
2025-04-30 10:44:24 +03:00
2025-04-30 10:44:24 +03:00
2025-06-03 11:45:58 +02:00
2025-06-03 11:45:58 +02:00
2025-04-22 00:53:12 +05:00
2025-04-22 00:53:12 +05:00
2025-04-22 00:53:12 +05:00
2025-04-22 00:53:12 +05:00
2025-04-22 00:53:12 +05:00
2025-04-02 06:20:35 +11:00
2025-04-03 21:41:58 +00:00
2025-06-03 11:45:58 +02:00
2025-04-02 06:20:35 +11:00
2025-04-02 06:20:35 +11:00
2025-04-08 23:06:31 +03:00
2025-05-03 22:49:23 +03:00
2025-05-03 22:49:23 +03:00
2025-04-03 21:41:58 +00:00
2025-06-03 11:45:58 +02:00
2025-06-03 11:45:58 +02:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-09 15:01:14 +10:00
2025-04-09 15:01:14 +10:00
2025-04-09 15:01:14 +10:00
2025-04-09 15:01:14 +10:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 11:08:55 +03:00
2025-04-08 23:06:31 +03:00
2025-04-08 23:06:31 +03:00
2025-04-08 23:06:31 +03:00
2025-04-10 23:48:57 +03:00
2025-04-10 23:48:57 +03:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-03 21:41:58 +00:00
2025-04-10 09:56:37 +02:00
2025-04-16 22:44:02 +03:00
2025-05-16 12:40:04 +02:00
2025-05-16 12:40:04 +02:00
2025-05-16 12:40:04 +02:00
2025-04-30 10:44:24 +03:00
2025-04-30 10:44:24 +03:00
2025-04-25 17:02:59 +05:00
2025-04-25 17:02:59 +05:00
2025-04-25 17:02:59 +05:00
2025-05-09 15:31:27 +00:00
2025-06-03 11:45:58 +02:00
2025-06-03 11:45:58 +02:00
2025-04-08 23:06:31 +03:00
2025-04-03 21:41:58 +00:00
2025-04-18 15:57:29 +02:00
2025-04-18 15:57:29 +02:00
2025-04-03 21:41:58 +00:00
2025-05-14 13:32:59 +01:00
2025-05-14 13:32:59 +01:00
2025-06-03 13:28:38 +02:00
2025-04-03 21:41:58 +00:00
2025-04-15 10:08:49 +02:00
2025-04-15 10:08:49 +02:00
2025-04-15 10:08:36 +02:00
2025-04-15 10:08:49 +02:00
2025-04-15 10:08:36 +02:00
2025-04-15 10:08:49 +02:00
2025-04-15 10:08:49 +02:00
2025-04-24 02:57:10 +02:00
2025-05-27 15:57:41 +00:00
2025-05-27 15:57:41 +00:00
2025-04-13 21:48:53 +03:00
2025-04-03 11:08:55 +03:00
2025-04-13 21:48:53 +03:00
2025-04-03 11:08:55 +03:00
2025-04-03 21:41:58 +00:00