Skip to content

Update tutorial.md : rename pkgid to crate_id #11171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -3071,7 +3071,7 @@ Therefore, if you plan to compile your crate as a library, you should annotate i

# #[crate_type = "lib"];
// Package ID
#[pkgid = "farm#2.5"];
#[crate_id = "farm#2.5"];

// ...
# fn farm() {}
Expand All @@ -3095,7 +3095,7 @@ or setting the crate type (library or executable) explicitly:
// ...

// This crate is a library ("bin" is the default)
#[pkgid = "farm#2.5"];
#[crate_id = "farm#2.5"];
#[crate_type = "lib"];

// Turn on a warning
Expand All @@ -3116,7 +3116,7 @@ We define two crates, and use one of them as a library in the other.

~~~~
// world.rs
#[pkgid = "world#0.42"];
#[crate_id = "world#0.42"];
# extern mod extra;
pub fn explore() -> &'static str { "world" }
# fn main() {}
Expand Down