Skip to content

Commit 51b5f32

Browse files
committed
Update Docs to use crateid
1 parent 016d52e commit 51b5f32

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

doc/rust.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ the behavior of the compiler.
610610

611611
~~~~
612612
// Package ID
613-
#[ pkgid = "projx#2.5" ];
613+
#[ crate_id = "projx#2.5" ];
614614
615615
// Additional metadata attributes
616616
#[ desc = "Project X" ];
@@ -776,9 +776,9 @@ as the `ident` provided in the `extern_mod_decl`.
776776
The external crate is resolved to a specific `soname` at compile time, and a
777777
runtime linkage requirement to that `soname` is passed to the linker for
778778
loading at runtime. The `soname` is resolved at compile time by scanning the
779-
compiler's library path and matching the optional `pkgid` provided as a string literal
780-
against the `pkgid` attributes that were declared on the external crate when
781-
it was compiled. If no `pkgid` is provided, a default `name` attribute is
779+
compiler's library path and matching the optional `crateid` provided as a string literal
780+
against the `crateid` attributes that were declared on the external crate when
781+
it was compiled. If no `crateid` is provided, a default `name` attribute is
782782
assumed, equal to the `ident` given in the `extern_mod_decl`.
783783

784784
Four examples of `extern mod` declarations:
@@ -1729,7 +1729,7 @@ names are effectively reserved. Some significant attributes include:
17291729
* The `cfg` attribute, for conditional-compilation by build-configuration.
17301730
* The `lang` attribute, for custom definitions of traits and functions that are known to the Rust compiler (see [Language items](#language-items)).
17311731
* The `link` attribute, for describing linkage metadata for a extern blocks.
1732-
* The `pkgid` attribute, for describing the package ID of a crate.
1732+
* The `crate_id` attribute, for describing the package ID of a crate.
17331733
* The `test` attribute, for marking functions as unit tests.
17341734
* The `allow`, `warn`, `forbid`, and `deny` attributes, for
17351735
controlling lint checks (see [Lint check attributes](#lint-check-attributes)).
@@ -3792,7 +3792,7 @@ specified then log level 4 is assumed. Debug messages can be omitted
37923792
by passing `--cfg ndebug` to `rustc`.
37933793

37943794
As an example, to see all the logs generated by the compiler, you would set
3795-
`RUST_LOG` to `rustc`, which is the crate name (as specified in its `pkgid`
3795+
`RUST_LOG` to `rustc`, which is the crate name (as specified in its `crate_id`
37963796
[attribute](#attributes)). To narrow down the logs to just crate resolution,
37973797
you would set it to `rustc::metadata::creader`. To see just error logging
37983798
use `rustc=0`.

doc/rustdoc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ comments":
1313
~~~
1414
// the "link" crate attribute is currently required for rustdoc, but normally
1515
// isn't needed.
16-
#[pkgid = "universe"];
16+
#[crate_id = "universe"];
1717
#[crate_type="lib"];
1818
1919
//! Tools for dealing with universes (this is a doc comment, and is shown on

doc/rustpkg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ then both `bar` and `bar/extras/baz` are valid package identifiers
9090
in the workspace `foo`.
9191

9292
Because rustpkg uses generic source file names as the main inputs, you will
93-
need to specify the package identifier in them using the `pkgid` attribute
93+
need to specify the package identifier in them using the `crate_id` attribute
9494
on the crate.
9595

9696
## Source files

0 commit comments

Comments
 (0)