~~~~
// Package ID
-#[ pkgid = "projx#2.5" ];
+#[ crate_id = "projx#2.5" ];
// Additional metadata attributes
#[ desc = "Project X" ];
The external crate is resolved to a specific `soname` at compile time, and a
runtime linkage requirement to that `soname` is passed to the linker for
loading at runtime. The `soname` is resolved at compile time by scanning the
-compiler's library path and matching the optional `pkgid` provided as a string literal
-against the `pkgid` attributes that were declared on the external crate when
-it was compiled. If no `pkgid` is provided, a default `name` attribute is
+compiler's library path and matching the optional `crateid` provided as a string literal
+against the `crateid` attributes that were declared on the external crate when
+it was compiled. If no `crateid` is provided, a default `name` attribute is
assumed, equal to the `ident` given in the `extern_mod_decl`.
Four examples of `extern mod` declarations:
* The `cfg` attribute, for conditional-compilation by build-configuration.
* The `lang` attribute, for custom definitions of traits and functions that are known to the Rust compiler (see [Language items](#language-items)).
* The `link` attribute, for describing linkage metadata for a extern blocks.
-* The `pkgid` attribute, for describing the package ID of a crate.
+* The `crate_id` attribute, for describing the package ID of a crate.
* The `test` attribute, for marking functions as unit tests.
* The `allow`, `warn`, `forbid`, and `deny` attributes, for
controlling lint checks (see [Lint check attributes](#lint-check-attributes)).
by passing `--cfg ndebug` to `rustc`.
As an example, to see all the logs generated by the compiler, you would set
-`RUST_LOG` to `rustc`, which is the crate name (as specified in its `pkgid`
+`RUST_LOG` to `rustc`, which is the crate name (as specified in its `crate_id`
[attribute](#attributes)). To narrow down the logs to just crate resolution,
you would set it to `rustc::metadata::creader`. To see just error logging
use `rustc=0`.