mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
a647ba250a
`#[cfg]`s are frequently used to gate crate content behind cargo features. This can lead to very confusing errors when features are missing. For example, `serde` doesn't have the `derive` feature by default. Therefore, `serde::Serialize` fails to resolve with a generic error, even though the macro is present in the docs. This commit adds a list of all stripped item names to metadata. This is filled during macro expansion and then, through a fed query, persisted in metadata. The downstream resolver can then access the metadata to look at possible candidates for mentioning in the errors. This slightly increases metadata (800k->809k for the feature-heavy windows crate), but not enough to really matter.
103 lines
3.5 KiB
Plaintext
103 lines
3.5 KiB
Plaintext
error[E0433]: failed to resolve: could not find `RustcDecodable` in `core`
|
|
--> $DIR/builtin-std-paths-fail.rs:2:11
|
|
|
|
|
LL | core::RustcDecodable,
|
|
| ^^^^^^^^^^^^^^ could not find `RustcDecodable` in `core`
|
|
|
|
error[E0433]: failed to resolve: could not find `RustcDecodable` in `core`
|
|
--> $DIR/builtin-std-paths-fail.rs:4:11
|
|
|
|
|
LL | core::RustcDecodable,
|
|
| ^^^^^^^^^^^^^^ could not find `RustcDecodable` in `core`
|
|
|
|
error[E0433]: failed to resolve: could not find `RustcDecodable` in `core`
|
|
--> $DIR/builtin-std-paths-fail.rs:2:11
|
|
|
|
|
LL | core::RustcDecodable,
|
|
| ^^^^^^^^^^^^^^ could not find `RustcDecodable` in `core`
|
|
|
|
error[E0433]: failed to resolve: could not find `RustcDecodable` in `core`
|
|
--> $DIR/builtin-std-paths-fail.rs:4:11
|
|
|
|
|
LL | core::RustcDecodable,
|
|
| ^^^^^^^^^^^^^^ could not find `RustcDecodable` in `core`
|
|
|
|
error[E0433]: failed to resolve: could not find `bench` in `core`
|
|
--> $DIR/builtin-std-paths-fail.rs:7:9
|
|
|
|
|
LL | #[core::bench]
|
|
| ^^^^^ could not find `bench` in `core`
|
|
|
|
error[E0433]: failed to resolve: could not find `global_allocator` in `core`
|
|
--> $DIR/builtin-std-paths-fail.rs:8:9
|
|
|
|
|
LL | #[core::global_allocator]
|
|
| ^^^^^^^^^^^^^^^^ could not find `global_allocator` in `core`
|
|
|
|
error[E0433]: failed to resolve: could not find `test_case` in `core`
|
|
--> $DIR/builtin-std-paths-fail.rs:9:9
|
|
|
|
|
LL | #[core::test_case]
|
|
| ^^^^^^^^^ could not find `test_case` in `core`
|
|
|
|
error[E0433]: failed to resolve: could not find `test` in `core`
|
|
--> $DIR/builtin-std-paths-fail.rs:10:9
|
|
|
|
|
LL | #[core::test]
|
|
| ^^^^ could not find `test` in `core`
|
|
|
|
error[E0433]: failed to resolve: could not find `RustcDecodable` in `std`
|
|
--> $DIR/builtin-std-paths-fail.rs:14:10
|
|
|
|
|
LL | std::RustcDecodable,
|
|
| ^^^^^^^^^^^^^^ could not find `RustcDecodable` in `std`
|
|
|
|
error[E0433]: failed to resolve: could not find `RustcDecodable` in `std`
|
|
--> $DIR/builtin-std-paths-fail.rs:16:10
|
|
|
|
|
LL | std::RustcDecodable,
|
|
| ^^^^^^^^^^^^^^ could not find `RustcDecodable` in `std`
|
|
|
|
error[E0433]: failed to resolve: could not find `RustcDecodable` in `std`
|
|
--> $DIR/builtin-std-paths-fail.rs:14:10
|
|
|
|
|
LL | std::RustcDecodable,
|
|
| ^^^^^^^^^^^^^^ could not find `RustcDecodable` in `std`
|
|
|
|
error[E0433]: failed to resolve: could not find `RustcDecodable` in `std`
|
|
--> $DIR/builtin-std-paths-fail.rs:16:10
|
|
|
|
|
LL | std::RustcDecodable,
|
|
| ^^^^^^^^^^^^^^ could not find `RustcDecodable` in `std`
|
|
|
|
error[E0433]: failed to resolve: could not find `bench` in `std`
|
|
--> $DIR/builtin-std-paths-fail.rs:19:8
|
|
|
|
|
LL | #[std::bench]
|
|
| ^^^^^ could not find `bench` in `std`
|
|
|
|
error[E0433]: failed to resolve: could not find `global_allocator` in `std`
|
|
--> $DIR/builtin-std-paths-fail.rs:20:8
|
|
|
|
|
LL | #[std::global_allocator]
|
|
| ^^^^^^^^^^^^^^^^ could not find `global_allocator` in `std`
|
|
|
|
error[E0433]: failed to resolve: could not find `test_case` in `std`
|
|
--> $DIR/builtin-std-paths-fail.rs:21:8
|
|
|
|
|
LL | #[std::test_case]
|
|
| ^^^^^^^^^ could not find `test_case` in `std`
|
|
|
|
error[E0433]: failed to resolve: could not find `test` in `std`
|
|
--> $DIR/builtin-std-paths-fail.rs:22:8
|
|
|
|
|
LL | #[std::test]
|
|
| ^^^^ could not find `test` in `std`
|
|
|
|
|
note: found an item that was configured out
|
|
--> $SRC_DIR/std/src/lib.rs:LL:COL
|
|
|
|
error: aborting due to 16 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0433`.
|