From 180cf1b7afd9b086210c71b26eaebec7f8bf070c Mon Sep 17 00:00:00 2001 From: Jacqueline Outka Date: Mon, 30 Oct 2017 18:23:46 -0400 Subject: [PATCH 1/2] Fixes #890 --- src/attribute/crate.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/attribute/crate.md b/src/attribute/crate.md index 5268aa7242..fb39d8c8fe 100644 --- a/src/attribute/crate.md +++ b/src/attribute/crate.md @@ -4,6 +4,11 @@ The `crate_type` attribute can be used to tell the compiler whether a crate is a binary or a library (and even which type of library), and the `crate_name` attribute can be used to set the name of the crate. +However, it is important to note that the `crate_type` attribute has **no** +effect whatsoever when using Cargo, the Rust package manager. Since Cargo is +used for the majority of Rust projects, this means real-world uses of +`crate-type` are relatively limited. + ```rust,editable // This crate is a library #![crate_type = "lib"] From 417e19f88818c6f778325d3258a07dc578969add Mon Sep 17 00:00:00 2001 From: Jacqueline Outka Date: Tue, 31 Oct 2017 18:46:43 -0400 Subject: [PATCH 2/2] fix reference to crate_name --- src/attribute/crate.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/attribute/crate.md b/src/attribute/crate.md index fb39d8c8fe..c8a119a8e6 100644 --- a/src/attribute/crate.md +++ b/src/attribute/crate.md @@ -4,10 +4,10 @@ The `crate_type` attribute can be used to tell the compiler whether a crate is a binary or a library (and even which type of library), and the `crate_name` attribute can be used to set the name of the crate. -However, it is important to note that the `crate_type` attribute has **no** -effect whatsoever when using Cargo, the Rust package manager. Since Cargo is -used for the majority of Rust projects, this means real-world uses of -`crate-type` are relatively limited. +However, it is important to note that both the `crate_type` and `crate_name` +attributes have **no** effect whatsoever when using Cargo, the Rust package +manager. Since Cargo is used for the majority of Rust projects, this means +real-world uses of `crate-type` and `crate_name` are relatively limited. ```rust,editable // This crate is a library