Skip to content

Commit

Permalink
Update Docs to use crateid
Browse files Browse the repository at this point in the history
  • Loading branch information
luisbg committed Dec 29, 2013
1 parent 016d52e commit 51b5f32
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions doc/rust.md
Expand Up @@ -610,7 +610,7 @@ the behavior of the compiler.

~~~~
// Package ID
#[ pkgid = "projx#2.5" ];
#[ crate_id = "projx#2.5" ];
// Additional metadata attributes
#[ desc = "Project X" ];
Expand Down Expand Up @@ -776,9 +776,9 @@ as the `ident` provided in the `extern_mod_decl`.
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:
Expand Down Expand Up @@ -1729,7 +1729,7 @@ names are effectively reserved. Some significant attributes include:
* 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)).
Expand Down Expand Up @@ -3792,7 +3792,7 @@ specified then log level 4 is assumed. Debug messages can be omitted
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`.
Expand Down
2 changes: 1 addition & 1 deletion doc/rustdoc.md
Expand Up @@ -13,7 +13,7 @@ comments":
~~~
// the "link" crate attribute is currently required for rustdoc, but normally
// isn't needed.
#[pkgid = "universe"];
#[crate_id = "universe"];
#[crate_type="lib"];
//! Tools for dealing with universes (this is a doc comment, and is shown on
Expand Down
2 changes: 1 addition & 1 deletion doc/rustpkg.md
Expand Up @@ -90,7 +90,7 @@ then both `bar` and `bar/extras/baz` are valid package identifiers
in the workspace `foo`.

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

## Source files
Expand Down

5 comments on commit 51b5f32

@bors
Copy link
Contributor

@bors bors commented on 51b5f32 Dec 30, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from cmr
at luisbg@51b5f32

@bors
Copy link
Contributor

@bors bors commented on 51b5f32 Dec 30, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging luisbg/rust/crateid = 51b5f32 into auto

@bors
Copy link
Contributor

@bors bors commented on 51b5f32 Dec 30, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

luisbg/rust/crateid = 51b5f32 merged ok, testing candidate = f37b746

@bors
Copy link
Contributor

@bors bors commented on 51b5f32 Dec 30, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 51b5f32 Dec 30, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = f37b746

Please sign in to comment.