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 16:13:48 +01:00
2024-02-09 15:43:08 -03:00
2024-02-09 15:43:08 -03:00
2024-01-16 09:25:28 +01:00
2024-02-07 10:42:01 +08:00
2024-02-09 15:43:08 -03:00
2024-02-09 15:43:08 -03:00
2024-02-10 16:13:48 +01:00
2024-02-07 10:42:01 +08:00
2024-02-07 10:42:01 +08:00
2024-02-01 03:31:03 +00:00
2024-02-07 10:42:01 +08:00
2024-02-07 10:42:01 +08:00
2024-02-09 15:43:08 -03:00
2024-02-10 16:13:48 +01:00
2024-02-08 19:56:30 -05:00
2024-02-09 15:43:08 -03:00
2024-01-27 16:38:57 +01:00
2024-01-23 21:16:24 +08:00
2024-02-10 00:13:13 +09:00
2024-02-09 15:43:08 -03:00
2024-02-01 03:31:03 +00:00
2024-02-07 10:42:01 +08:00
2024-01-27 16:38:57 +01:00
2024-02-07 10:42:01 +08: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-01-24 00:41:45 +01: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-10 16:13:48 +01:00
2024-02-07 10:42:01 +08:00
2024-02-07 10:42:01 +08:00
2024-02-01 03:31:03 +00:00
2024-02-06 02:22:58 +00:00
2024-02-10 16:13:48 +01:00
2024-02-07 10:42:01 +08:00
2024-02-04 11:34:10 +08:00
2024-02-01 03:31:03 +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-07 10:42:01 +08:00
2024-02-07 10:42:01 +08:00
2024-02-07 10:42:01 +08:00