bors
a97c36dd2e
Auto merge of #109005 - Nilstrieb:dont-forgor-too-much-from-cfg, r=petrochenkov
...
Remember names of `cfg`-ed out items to mention them in diagnostics
# Examples
## `serde::Deserialize` without the `derive` feature (a classic beginner mistake)
I had to slightly modify serde so that it uses explicit re-exports instead of a glob re-export. (Update: a serde PR was merged that adds the manual re-exports)
```
error[E0433]: failed to resolve: could not find `Serialize` in `serde`
--> src/main.rs:1:17
|
1 | #[derive(serde::Serialize)]
| ^^^^^^^^^ could not find `Serialize` in `serde`
|
note: crate `serde` has an item named `Serialize` but it is inactive because its cfg predicate evaluated to false
--> /home/gh-Nilstrieb/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.160/src/lib.rs:343:1
|
343 | #[cfg(feature = "serde_derive")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
344 | pub use serde_derive::{Deserialize, Serialize};
| ^^^^^^^^^
= note: the item is gated behind the `serde_derive` feature
= note: see https://doc.rust-lang.org/cargo/reference/features.html for how to activate a crate's feature
```
(the suggestion is not ideal but that's serde's fault)
I already tested the metadata size impact locally by compiling the `windows` crate without any features. `800k` -> `809k`
r? `@ghost`
2023-06-07 17:38:57 +00:00
..
2023-04-30 00:06:26 +08:00
2023-04-25 00:08:35 +02:00
2023-04-25 00:08:35 +02:00
2023-05-08 03:36:30 +00:00
2023-05-05 22:40:04 +12:00
2023-03-12 14:57:38 +01:00
2023-04-23 18:09:30 +00:00
2023-05-24 01:17:38 +02:00
2023-01-11 21:30:32 +00:00
2023-05-03 19:41:15 +00:00
2023-05-12 00:10:52 +00:00
2023-06-05 19:52:04 +00:00
2023-05-29 22:33:46 +03:00
2023-06-02 19:22:25 +00:00
2023-04-03 11:08:14 +08:00
2023-04-13 22:08:07 -05:00
2023-04-28 20:28:56 -05:00
2023-04-27 01:34:03 +00:00
2023-01-30 20:12:19 +00:00
2023-01-30 20:12:19 +00:00
2023-06-06 12:00:33 +02:00
2023-04-12 22:50:10 +00:00
2023-01-15 19:46:20 +00:00
2023-01-12 22:25:30 +00:00
2023-01-30 21:51:33 +00:00
2023-01-15 22:17:54 +13:00
2023-06-01 19:17:19 +02:00
2023-05-31 17:45:45 +00:00
2023-05-06 18:40:47 +02:00
2023-05-12 00:10:52 +00:00
2023-02-21 05:21:07 +00:00
2023-06-05 19:05:15 -07:00
2023-04-16 23:09:57 +00:00
2023-04-15 16:11:42 -07:00
2023-05-24 19:35:59 -03:00
2023-05-30 12:40:35 +02:00
2023-05-30 13:03:40 +02:00
2023-04-03 09:24:11 +02:00
2023-01-30 20:12:19 +00:00
2023-04-15 16:11:42 -07:00
2023-01-30 20:12:21 +00:00
2023-04-28 14:42:03 +02:00
2023-06-06 09:37:30 +02:00
2023-06-01 14:45:18 +00:00
2023-06-02 07:57:21 +00:00
2023-01-11 09:32:13 +00:00
2023-04-15 16:11:42 -07:00
2023-05-12 00:10:52 +00:00
2023-05-08 17:58:01 -03:00
2023-01-18 04:07:39 +00:00
2023-01-16 11:09:53 +01:00
2023-05-05 01:22:17 -05:00
2023-02-22 08:40:47 -07:00
2023-01-30 20:12:19 +00:00
2023-04-12 22:50:10 +00:00
2023-04-27 01:34:03 +00:00
2023-05-26 06:55:06 +10:00
2023-04-27 01:34:03 +00:00
2023-02-09 14:52:54 +00:00
2023-05-12 00:10:52 +00:00
2023-05-05 22:40:05 +12:00
2023-05-21 14:16:41 +02:00
2023-05-04 18:06:07 +00:00
2023-05-12 00:10:52 +00:00
2023-05-31 17:45:45 +00:00
2023-05-26 13:15:15 -04:00
2023-03-13 17:31:55 +04:00
2023-05-09 20:49:32 +02:00
2023-05-29 12:07:41 -03:00
2023-05-18 01:47:55 +00:00
2023-02-28 14:58:14 -08:00
2023-05-21 14:16:41 +02:00
2023-02-23 19:05:13 +09:00
2023-05-11 21:41:07 +01:00
2023-05-24 19:35:59 -03:00
2023-05-05 13:02:43 -07:00
2023-05-13 21:34:05 +00:00
2023-05-11 12:14:57 -07:00
2023-05-08 17:58:01 -03:00
2023-03-01 13:26:59 +01:00
2023-05-24 19:35:59 -03:00
2023-01-30 20:12:19 +00:00
2023-01-30 20:12:21 +00:00
2023-01-30 20:12:21 +00:00
2023-05-21 14:16:41 +02:00
2023-05-16 11:39:38 +02:00
2023-05-01 16:37:00 +08:00
2023-04-03 15:59:21 +00:00
2023-01-11 09:32:13 +00:00
2023-05-30 13:04:25 +02:00
2023-05-21 13:37:32 +02:00
2023-02-09 10:26:49 +00:00
2023-06-01 11:09:43 +05:30
2023-06-05 21:20:51 +00:00
2023-05-27 18:49:07 +08:00
2023-01-30 20:12:19 +00:00
2023-02-13 18:41:18 +00:00
2023-05-09 20:49:31 +02:00
2023-04-11 17:45:42 +00:00
2023-06-01 02:28:31 +08:00
2023-02-09 12:29:43 +09:00
2023-05-03 20:09:10 +03:00
2023-04-12 22:50:10 +00:00
2023-04-13 22:08:07 -05:00
2023-02-28 15:59:47 +01:00
2023-05-16 18:50:26 +02:00
2023-04-25 15:25:19 +00:00
2023-06-05 19:40:30 +00:00
2023-05-15 21:16:35 +03:00
2023-01-30 20:12:19 +00:00
2023-05-13 21:34:05 +00:00
2023-03-12 13:19:46 +00:00
2023-03-07 21:26:19 +01:00
2023-05-05 16:05:04 -07:00
2023-03-01 13:26:59 +01:00
2023-04-10 06:52:41 +00:00
2023-05-21 17:48:36 -07:00
2023-04-15 07:46:46 +00:00
2023-05-29 19:58:11 +03:00
2023-06-06 22:00:20 +02:00
2023-05-25 17:40:46 +00:00
2023-05-31 16:51:25 +00:00
2023-06-07 17:38:57 +00:00
2023-04-12 22:50:10 +00:00
2023-03-22 11:37:57 +01:00
2023-05-31 14:02:57 +00:00
2023-04-18 07:14:01 -05:00
2023-05-26 13:15:15 -04:00
2023-06-04 20:49:30 +08:00
2023-06-05 08:34:06 +00:00
2023-04-25 00:08:35 +02:00
2023-01-13 20:50:34 +00:00
2023-04-12 22:50:10 +00:00
2023-03-22 21:12:40 -07:00
2023-02-16 11:42:35 -03:00
2023-05-08 03:36:30 +00:00
2023-04-12 22:50:10 +00:00
2023-05-05 18:54:06 +01:00
2023-05-24 19:16:07 +00:00
2023-06-05 19:40:30 +00:00
2023-04-03 09:24:11 +02:00
2023-03-22 21:12:40 -07:00
2023-05-03 20:09:10 +03:00
2023-06-01 14:45:18 +00:00
2023-05-12 00:10:52 +00:00
2023-06-02 01:33:09 +00:00
2023-04-12 22:50:10 +00:00
2023-05-21 14:16:41 +02:00
2023-01-12 22:25:30 +00:00
2023-04-28 20:28:56 -05:00
2023-04-29 13:01:46 +01:00
2023-05-27 16:35:16 +02:00
2023-06-03 15:02:13 +08:00
2023-05-31 14:02:57 +00:00
2023-01-11 14:09:14 -08:00
2023-04-21 16:14:43 +00:00
2023-05-21 13:37:32 +02:00
2023-05-26 06:23:03 +00:00
2023-04-24 07:53:23 +02:00
2023-05-27 00:18:28 +02:00
2023-02-01 21:50:34 +01:00
2023-01-11 21:30:10 +00:00
2023-02-02 05:49:07 +00:00
2023-05-08 03:42:21 +00:00
2023-05-09 20:49:31 +02:00
2023-05-24 19:54:13 -03:00
2023-02-22 13:08:13 +00:00
2023-05-21 13:37:32 +02:00
2023-04-12 22:50:10 +00:00
2023-05-01 15:05:39 +01:00
2023-05-27 18:49:07 +08:00
2023-01-30 20:12:19 +00:00
2023-06-05 16:09:46 +00:00
2023-04-03 09:24:11 +02:00
2023-05-21 13:37:32 +02:00
2023-04-12 22:50:10 +00:00
2023-03-30 22:56:52 +02:00
2023-06-01 23:22:54 +00:00
2023-05-23 03:23:52 +00:00
2023-04-12 22:50:10 +00:00
2023-05-05 14:58:52 -07:00
2023-02-14 03:46:43 +00:00
2023-05-09 12:33:45 +05:30
2023-06-06 18:43:20 +00:00
2023-04-29 13:01:46 +01:00
2023-04-19 19:13:45 +00:00
2023-06-01 14:45:18 +00:00
2023-04-04 15:34:40 +00:00
2023-04-13 22:10:26 -05:00
2023-01-19 21:09:25 +01:00
2023-05-08 03:36:30 +00:00
2023-04-12 22:50:10 +00:00
2023-05-29 12:07:41 -03:00
2023-05-31 13:47:36 +00:00
2023-06-01 18:21:42 +00:00
2023-03-29 18:04:44 -04:00
2023-04-30 00:06:26 +08:00
2023-05-24 11:18:20 -05:00
2023-05-26 18:55:02 +01:00
2023-04-26 22:34:30 -04:00
2023-04-26 21:02:56 +02:00
2023-04-07 08:33:56 +01:00
2023-05-26 12:16:30 -05:00
2023-04-12 22:50:10 +00:00
2023-06-06 18:44:22 +00:00
2023-04-18 17:33:46 -07:00
2023-04-13 21:57:08 +00:00
2023-02-07 19:17:24 +00:00
2023-05-21 14:16:41 +02:00
2023-01-15 19:46:20 +00:00
2023-04-02 19:42:30 -04:00
2023-05-16 11:39:39 +02:00
2023-04-20 18:01:07 +00:00
2023-06-01 11:09:43 +05:30
2023-02-22 08:40:47 -07:00
2023-06-03 20:38:12 +02:00
2023-05-01 16:15:17 +08:00
2023-05-26 16:01:29 +01:00
2023-05-18 09:29:48 +08:00
2023-05-24 19:16:07 +00:00
2023-05-03 20:09:10 +03:00
2023-04-02 19:42:30 -04:00
2023-04-12 22:50:10 +00:00
2023-04-02 19:42:30 -04:00
2023-05-18 01:53:01 +00:00
2023-06-05 19:05:15 -07:00
2023-04-29 13:01:46 +01:00
2023-05-16 20:30:48 +00:00
2023-04-02 19:42:30 -04:00
2023-04-02 19:42:30 -04:00
2023-05-12 00:10:52 +00:00
2023-05-24 19:35:59 -03:00
2023-03-01 13:26:59 +01:00
2023-01-19 19:35:49 +00:00
2023-05-09 20:35:39 -04:00
2023-05-09 20:35:39 -04:00
2023-01-15 19:46:20 +00:00
2023-01-15 19:46:20 +00:00
2023-05-27 16:35:16 +02:00
2023-02-18 02:42:43 +00:00
2023-03-12 13:19:46 +00:00
2023-03-12 13:19:46 +00:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-05-21 13:37:32 +02:00
2023-01-30 20:12:19 +00:00
2023-01-30 20:12:19 +00:00
2023-05-09 20:35:39 -04:00
2023-01-16 20:24:01 +13:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-02-22 08:40:47 -07:00
2023-04-13 22:10:26 -05:00
2023-01-27 05:28:52 -08:00
2023-01-27 05:28:52 -08:00
2023-01-27 05:28:52 -08:00
2023-01-27 05:28:52 -08:00
2023-01-27 05:28:52 -08:00
2023-01-27 05:28:52 -08:00
2023-05-21 14:16:41 +02:00
2023-05-21 14:16:41 +02:00
2023-05-10 19:36:02 +02:00
2023-04-08 21:32:55 +00:00
2023-04-08 21:32:55 +00:00
2023-04-13 22:08:07 -05:00
2023-04-13 22:08:07 -05:00
2023-04-13 22:10:26 -05:00
2023-04-13 22:08:07 -05:00
2023-04-13 22:08:07 -05:00
2023-04-13 22:08:07 -05:00
2023-04-13 22:08:07 -05:00
2023-02-13 18:41:18 +00:00
2023-04-17 22:40:31 -05:00
2023-04-17 22:40:31 -05:00
2023-04-17 22:40:31 -05:00
2023-04-13 22:08:07 -05:00
2023-01-30 20:12:19 +00:00
2023-01-30 20:12:19 +00:00
2023-04-12 22:50:10 +00:00
2023-01-30 20:12:21 +00:00
2023-04-25 00:08:33 +02:00
2023-03-08 00:00:18 +00:00
2023-03-08 00:00:18 +00:00
2023-05-04 15:39:21 +02:00
2023-05-03 20:09:10 +03:00
2023-01-30 20:12:19 +00:00
2023-01-30 21:51:33 +00:00
2023-02-23 10:27:06 -07:00
2023-02-23 10:27:06 -07:00
2023-03-26 17:30:29 +00:00
2023-02-04 20:13:16 -08:00
2023-02-04 20:13:16 -08:00
2023-02-04 20:13:16 -08:00
2023-01-30 20:12:19 +00:00
2023-01-15 19:46:20 +00:00
2023-02-28 15:59:47 +01:00
2023-05-15 21:22:13 +01:00