Matthias Krüger
e525bc9592
Rollup merge of #120272 - long-long-float:suppress-suggestions-in-derive-macro, r=oli-obk
...
Suppress suggestions in derive macro
close #118809
I suppress warnings inside derive macros.
For example, the compiler emits following error by a program described in https://github.com/rust-lang/rust/issues/118809#issuecomment-1852256687 with a suggestion that indicates invalid syntax.
```
error[E0308]: `?` operator has incompatible types
--> src/main.rs:3:17
|
3 | #[derive(Debug, Deserialize)]
| ^^^^^^^^^^^ expected `u32`, found `u64`
|
= note: `?` operator cannot convert from `u64` to `u32`
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can convert a `u64` to a `u32` and panic if the converted value doesn't fit
|
3 | #[derive(Debug, Deserialize.try_into().unwrap())]
| ++++++++++++++++++++
For more information about this error, try `rustc --explain E0308`.
error: could not compile `serde_test` (bin "serde_test") due to 2 previous errors
```
In this PR, suggestions to cast are suppressed.
```
error[E0308]: `?` operator has incompatible types
--> src/main.rs:3:17
|
3 | #[derive(Debug, Deserialize)]
| ^^^^^^^^^^^ expected `u32`, found `u64`
|
= note: `?` operator cannot convert from `u64` to `u32`
= note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0308`.
error: could not compile `serde_test` (bin "serde_test") due to 2 previous errors
```
2024-02-11 01:37:54 +01:00
..
2024-01-30 15:46:40 +00:00
2024-02-07 10:42:01 +08:00
2024-02-10 13:12:28 +01:00
2024-02-10 16:13:48 +01:00
2024-02-08 05:01:09 +00:00
2024-01-26 20:47:11 +00:00
2024-02-10 03:31:34 +00:00
2024-02-09 00:13:51 +00:00
2024-02-10 07:15:15 +00:00
2024-02-08 08:10:43 +00:00
2024-02-09 15:43:08 -03:00
2024-02-07 18:24:43 +01:00
2024-02-09 15:43:08 -03:00
2024-01-30 21:28:18 +00:00
2024-01-16 09:25:28 +01:00
2024-01-30 19:26:13 +00:00
2024-02-07 10:42:01 +08:00
2024-02-09 09:19:44 +05:30
2024-02-06 22:45:41 +01:00
2024-01-24 02:53:15 +00:00
2024-02-08 20:34:59 +01:00
2024-02-08 08:10:43 +00:00
2024-02-09 15:43:08 -03:00
2024-02-09 15:43:08 -03:00
2024-02-08 05:01:09 +00:00
2024-01-24 17:23:42 +03:00
2024-02-10 16:12:55 +01:00
2024-02-08 08:10:43 +00:00
2024-02-10 16:13:48 +01:00
2024-02-07 16:18:31 +00:00
2024-02-07 10:42:01 +08:00
2024-02-06 22:45:42 +01:00
2024-02-07 10:42:01 +08:00
2024-02-08 08:10:43 +00:00
2024-02-06 20:52:13 +00:00
2024-02-08 17:33:04 +00:00
2024-02-01 03:31:03 +00:00
2024-02-07 14:59:26 +00:00
2024-01-24 16:32:24 +00:00
2024-02-07 10:42:01 +08:00
2024-02-08 08:10:43 +00:00
2024-02-01 16:18:03 +01:00
2024-02-10 16:12:55 +01:00
2024-01-30 21:28:18 +00:00
2024-02-07 10:42:01 +08:00
2024-02-08 08:10:43 +00:00
2024-02-08 08:10:43 +00:00
2024-01-29 17:43:07 +08:00
2024-02-09 15:43:08 -03:00
2024-02-06 17:44:53 +03:00
2024-02-10 16:13:48 +01:00
2024-01-30 21:28:18 +00:00
2024-02-08 08:10:43 +00:00
2024-01-30 21:28:18 +00:00
2024-01-23 10:31:07 +01:00
2024-01-30 21:28:18 +00:00
2024-02-10 07:15:15 +00:00
2024-01-31 16:51:42 +00:00
2024-02-08 08:10:43 +00:00
2024-02-08 08:10:43 +00:00
2024-02-09 00:13:51 +00:00
2024-02-08 19:56:30 -05:00
2024-02-09 14:41:48 +01:00
2024-01-19 15:27:32 +01:00
2024-02-09 20:17:48 +03:00
2024-01-30 21:28:18 +00:00
2024-01-31 16:51:42 +00:00
2024-02-08 08:10:43 +00:00
2024-02-01 10:27:54 +00:00
2024-01-30 21:28:18 +00:00
2024-01-26 14:43:29 +01:00
2024-02-08 08:10:43 +00:00
2024-02-09 15:43:08 -03:00
2024-02-01 03:30:26 +00:00
2024-02-08 08:10:43 +00:00
2024-02-04 19:42:12 +01:00
2024-01-27 16:38:57 +01:00
2024-02-01 16:18:03 +01:00
2024-01-23 21:16:24 +08:00
2024-02-10 00:13:13 +09:00
2024-02-09 14:41:48 +01:00
2024-02-08 08:10:43 +00:00
2024-02-08 08:10:43 +00:00
2024-02-09 15:43:08 -03:00
2024-02-01 03:31:03 +00:00
2024-02-05 10:17:31 +00:00
2024-02-05 11:07:26 +01:00
2024-02-08 08:10:43 +00:00
2024-02-09 00:40:43 +00:00
2024-02-08 08:10:43 +00:00
2024-01-30 21:28:18 +00:00
2024-02-07 10:42:01 +08:00
2024-01-30 21:28:18 +00:00
2024-02-01 20:01:05 +01:00
2024-02-08 08:10:43 +00:00
2024-01-30 21:28:18 +00:00
2024-01-27 16:38:57 +01:00
2024-02-07 14:59:26 +00:00
2024-01-30 21:28:18 +00:00
2024-01-30 21:28:18 +00:00
2024-02-08 08:10:43 +00:00
2024-02-07 10:42:01 +08:00
2024-01-18 13:16:09 -05:00
2024-01-29 19:48:44 +00:00
2024-02-07 15:26:57 +08:00
2024-02-08 08:10:43 +00:00
2024-02-09 15:43:08 -03:00
2024-01-16 14:58:42 -05:00
2024-02-08 19:56:30 -05:00
2024-02-07 16:01:58 +01:00
2024-02-09 15:43:08 -03:00
2024-02-11 01:37:54 +01:00
2024-02-01 03:30:26 +00:00
2024-01-30 21:28:18 +00:00
2024-02-08 08:10:43 +00:00
2024-01-24 00:41:45 +01:00
2024-01-29 17:43:07 +08:00
2024-02-07 10:42:01 +08:00
2024-02-08 20:34:59 +01:00
2024-02-07 10:42:01 +08:00
2024-02-01 16:18:03 +01:00
2024-01-20 02:30:58 +04:00
2024-02-07 10:42:01 +08:00
2024-02-08 08:10:43 +00:00
2024-02-10 18:14:02 +11:00
2024-02-08 08:10:43 +00:00
2024-02-10 16:13:48 +01:00
2024-02-07 10:42:01 +08:00
2024-01-31 16:59:19 +00:00
2024-02-07 10:42:01 +08:00
2024-02-01 03:31:03 +00:00
2024-02-08 08:10:43 +00:00
2024-02-09 14:41:48 +01:00
2024-01-26 12:39:03 +08:00
2024-02-06 02:22:58 +00:00
2024-01-30 21:28:18 +00:00
2024-02-01 16:51:07 -08:00
2024-02-10 16:13:48 +01:00
2024-02-07 10:42:01 +08:00
2024-02-01 03:31:03 +00:00
2024-02-10 00:58:38 +01:00
2024-01-24 02:53:15 +00:00
2024-01-25 16:23:53 +00:00
2024-02-01 10:36:34 -08:00
2024-01-30 21:28:18 +00:00
2024-01-30 21:28:18 +00:00
2024-02-07 14:59:26 +00:00
2024-02-08 08:10:43 +00:00
2024-02-10 13:12:30 +01:00
2024-02-08 07:32:30 +00:00
2024-02-04 11:34:10 +08:00
2024-02-08 08:10:43 +00:00
2024-02-08 08:10:43 +00:00
2024-02-08 11:48:38 +01:00
2024-02-05 11:07:26 +01:00
2024-02-01 10:27:54 +00:00
2024-02-01 03:31:03 +00:00
2024-01-30 21:28:18 +00:00
2024-02-01 16:18:03 +01:00
2024-02-10 07:15:15 +00:00
2024-02-07 10:42:01 +08:00
2024-01-24 02:53:15 +00:00
2024-02-08 08:10:43 +00:00
2024-02-07 10:42:01 +08:00
2024-02-07 10:42:01 +08:00
2024-02-07 10:42:01 +08:00
2024-02-06 22:45:39 +01:00
2024-01-30 21:28:18 +00:00
2024-01-23 10:31:07 +01:00
2024-01-30 21:28:18 +00:00
2024-01-30 21:28:18 +00:00
2024-01-30 21:28:18 +00:00
2024-01-30 21:28:18 +00:00
2024-02-01 16:18:03 +01:00
2024-02-09 09:19:44 +05:30
2024-02-07 10:42:01 +08:00
2024-02-07 10:42:01 +08:00
2024-01-21 13:47:45 +01:00