about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2017-08-19 16:54:17 -0700
committerTamir Duberstein <tamird@gmail.com>2017-08-25 16:18:21 -0400
commitb3f50caee0e2f2f4d44e1c83bf73a112c2a398b1 (patch)
treee66b07e4e48f0969e02f1e95f99c755b22d2c0d4
parent0463566f27dfc5979b5b12eb7cea670a4e3f991c (diff)
downloadrust-b3f50caee0e2f2f4d44e1c83bf73a112c2a398b1.tar.gz
rust-b3f50caee0e2f2f4d44e1c83bf73a112c2a398b1.zip
*: remove crate_{name,type} attributes
Fixes #41701.
-rw-r--r--src/liballoc/lib.rs2
-rw-r--r--src/liballoc_jemalloc/lib.rs2
-rw-r--r--src/liballoc_system/lib.rs2
-rw-r--r--src/libarena/lib.rs3
-rw-r--r--src/libcollections/lib.rs2
-rw-r--r--src/libcore/lib.rs2
-rw-r--r--src/libfmt_macros/lib.rs3
-rw-r--r--src/libgetopts/lib.rs3
-rw-r--r--src/libgraphviz/lib.rs3
-rw-r--r--src/libpanic_abort/lib.rs2
-rw-r--r--src/libpanic_unwind/lib.rs2
-rw-r--r--src/libproc_macro/lib.rs3
-rw-r--r--src/libprofiler_builtins/lib.rs2
-rw-r--r--src/librand/lib.rs2
-rw-r--r--src/librustc/lib.rs3
-rw-r--r--src/librustc_apfloat/lib.rs1
-rw-r--r--src/librustc_back/lib.rs3
-rw-r--r--src/librustc_bitflags/lib.rs2
-rw-r--r--src/librustc_borrowck/lib.rs3
-rw-r--r--src/librustc_const_eval/lib.rs3
-rw-r--r--src/librustc_const_math/lib.rs3
-rw-r--r--src/librustc_data_structures/lib.rs3
-rw-r--r--src/librustc_driver/lib.rs3
-rw-r--r--src/librustc_errors/lib.rs3
-rw-r--r--src/librustc_incremental/lib.rs3
-rw-r--r--src/librustc_lint/lib.rs3
-rw-r--r--src/librustc_llvm/lib.rs3
-rw-r--r--src/librustc_metadata/lib.rs3
-rw-r--r--src/librustc_mir/lib.rs3
-rw-r--r--src/librustc_passes/lib.rs3
-rw-r--r--src/librustc_platform_intrinsics/lib.rs3
-rw-r--r--src/librustc_plugin/lib.rs3
-rw-r--r--src/librustc_privacy/lib.rs3
-rw-r--r--src/librustc_resolve/lib.rs3
-rw-r--r--src/librustc_save_analysis/lib.rs3
-rw-r--r--src/librustc_trans/lib.rs3
-rw-r--r--src/librustc_trans_utils/lib.rs3
-rw-r--r--src/librustc_typeck/lib.rs3
-rw-r--r--src/librustdoc/lib.rs3
-rw-r--r--src/libserialize/lib.rs3
-rw-r--r--src/libstd/lib.rs3
-rw-r--r--src/libstd_unicode/lib.rs2
-rw-r--r--src/libsyntax/lib.rs3
-rw-r--r--src/libsyntax_ext/lib.rs3
-rw-r--r--src/libsyntax_pos/lib.rs3
-rw-r--r--src/libterm/lib.rs3
-rw-r--r--src/libtest/lib.rs5
-rw-r--r--src/libunwind/lib.rs2
-rw-r--r--src/test/run-make/alloc-extern-crates/Makefile2
49 files changed, 4 insertions, 130 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index 4e91be365e2..2d41ed64810 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -60,8 +60,6 @@
 //! The [`heap`](heap/index.html) module defines the low-level interface to the
 //! default global allocator. It is not compatible with the libc allocator API.
 
-#![crate_name = "alloc"]
-#![crate_type = "rlib"]
 #![allow(unused_attributes)]
 #![unstable(feature = "alloc",
             reason = "this library is unlikely to be stabilized in its current \
diff --git a/src/liballoc_jemalloc/lib.rs b/src/liballoc_jemalloc/lib.rs
index 3a9cc1dd5a6..513b299fcf3 100644
--- a/src/liballoc_jemalloc/lib.rs
+++ b/src/liballoc_jemalloc/lib.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![crate_name = "alloc_jemalloc"]
-#![crate_type = "rlib"]
 #![no_std]
 #![unstable(feature = "alloc_jemalloc",
             reason = "this library is unlikely to be stabilized in its current \
diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs
index 9a7cba21e3c..1defe308713 100644
--- a/src/liballoc_system/lib.rs
+++ b/src/liballoc_system/lib.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![crate_name = "alloc_system"]
-#![crate_type = "rlib"]
 #![no_std]
 #![deny(warnings)]
 #![unstable(feature = "alloc_system",
diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs
index 8e3b3f2074d..96fcc81e8e6 100644
--- a/src/libarena/lib.rs
+++ b/src/libarena/lib.rs
@@ -18,9 +18,6 @@
 //! This crate implements `TypedArena`, a simple arena that can only hold
 //! objects of a single type.
 
-#![crate_name = "arena"]
-#![crate_type = "rlib"]
-#![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs
index 38143593eb1..55316db3d5a 100644
--- a/src/libcollections/lib.rs
+++ b/src/libcollections/lib.rs
@@ -8,8 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![crate_name = "collections"]
-#![crate_type = "rlib"]
 #![allow(unused_attributes)]
 #![unstable(feature = "collections",
             reason = "this library is unlikely to be stabilized in its current \
diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs
index 546d2a21939..c270c6ae0db 100644
--- a/src/libcore/lib.rs
+++ b/src/libcore/lib.rs
@@ -51,9 +51,7 @@
 // Since libcore defines many fundamental lang items, all tests live in a
 // separate crate, libcoretest, to avoid bizarre issues.
 
-#![crate_name = "core"]
 #![stable(feature = "core", since = "1.6.0")]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs
index 43345c6d097..24430b2e377 100644
--- a/src/libfmt_macros/lib.rs
+++ b/src/libfmt_macros/lib.rs
@@ -14,9 +14,6 @@
 //! Parsing does not happen at runtime: structures of `std::fmt::rt` are
 //! generated instead.
 
-#![crate_name = "fmt_macros"]
-#![crate_type = "rlib"]
-#![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs
index 83f2de54023..a0eacc817ca 100644
--- a/src/libgetopts/lib.rs
+++ b/src/libgetopts/lib.rs
@@ -77,9 +77,6 @@
 //! }
 //! ```
 
-#![crate_name = "getopts"]
-#![crate_type = "rlib"]
-#![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs
index 4ee0c3d92bd..5b1cf2dee9a 100644
--- a/src/libgraphviz/lib.rs
+++ b/src/libgraphviz/lib.rs
@@ -283,9 +283,6 @@
 //!
 //! * [DOT language](http://www.graphviz.org/doc/info/lang.html)
 
-#![crate_name = "graphviz"]
-#![crate_type = "rlib"]
-#![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/libpanic_abort/lib.rs b/src/libpanic_abort/lib.rs
index 348180a48dc..8be6f647023 100644
--- a/src/libpanic_abort/lib.rs
+++ b/src/libpanic_abort/lib.rs
@@ -14,8 +14,6 @@
 //! simpler! That being said, it's not quite as versatile, but here goes!
 
 #![no_std]
-#![crate_name = "panic_abort"]
-#![crate_type = "rlib"]
 #![unstable(feature = "panic_abort", issue = "32837")]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
diff --git a/src/libpanic_unwind/lib.rs b/src/libpanic_unwind/lib.rs
index 90f4b364482..5a340f1323d 100644
--- a/src/libpanic_unwind/lib.rs
+++ b/src/libpanic_unwind/lib.rs
@@ -23,8 +23,6 @@
 //! module.
 
 #![no_std]
-#![crate_name = "panic_unwind"]
-#![crate_type = "rlib"]
 #![unstable(feature = "panic_unwind", issue = "32837")]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs
index 38665b403d6..3f425c24a91 100644
--- a/src/libproc_macro/lib.rs
+++ b/src/libproc_macro/lib.rs
@@ -23,10 +23,7 @@
 //!
 //! See [the book](../book/first-edition/procedural-macros.html) for more.
 
-#![crate_name = "proc_macro"]
 #![stable(feature = "proc_macro_lib", since = "1.15.0")]
-#![crate_type = "rlib"]
-#![crate_type = "dylib"]
 #![deny(warnings)]
 #![deny(missing_docs)]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
diff --git a/src/libprofiler_builtins/lib.rs b/src/libprofiler_builtins/lib.rs
index 1fb2c6b7dbb..6d0d6d115b7 100644
--- a/src/libprofiler_builtins/lib.rs
+++ b/src/libprofiler_builtins/lib.rs
@@ -14,7 +14,5 @@
 #![unstable(feature = "profiler_runtime_lib",
             reason = "internal implementation detail of rustc right now",
             issue = "0")]
-#![crate_name = "profiler_builtins"]
-#![crate_type = "rlib"]
 #![allow(unused_features)]
 #![feature(staged_api)]
diff --git a/src/librand/lib.rs b/src/librand/lib.rs
index a3c4f6a4b1d..90b3020fff9 100644
--- a/src/librand/lib.rs
+++ b/src/librand/lib.rs
@@ -16,8 +16,6 @@
 //! is not recommended to use this library directly, but rather the official
 //! interface through `std::rand`.
 
-#![crate_name = "rand"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs
index 5b0760e561e..03dc2f3c1ac 100644
--- a/src/librustc/lib.rs
+++ b/src/librustc/lib.rs
@@ -14,9 +14,6 @@
 //!
 //! This API is completely unstable and subject to change.
 
-#![crate_name = "rustc"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_apfloat/lib.rs b/src/librustc_apfloat/lib.rs
index d9dbf787856..d4a02065761 100644
--- a/src/librustc_apfloat/lib.rs
+++ b/src/librustc_apfloat/lib.rs
@@ -39,7 +39,6 @@
 //!
 //! This API is completely unstable and subject to change.
 
-#![crate_name = "rustc_apfloat"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_back/lib.rs b/src/librustc_back/lib.rs
index 55b39f22670..6a9833d3784 100644
--- a/src/librustc_back/lib.rs
+++ b/src/librustc_back/lib.rs
@@ -21,9 +21,6 @@
 //! one that doesn't; the one that doesn't might get decent parallel
 //! build speedups.
 
-#![crate_name = "rustc_back"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_bitflags/lib.rs b/src/librustc_bitflags/lib.rs
index 73125655792..eb47144d1f9 100644
--- a/src/librustc_bitflags/lib.rs
+++ b/src/librustc_bitflags/lib.rs
@@ -9,8 +9,6 @@
 // except according to those terms.
 
 
-#![crate_name = "rustc_bitflags"]
-#![crate_type = "rlib"]
 #![no_std]
 #![deny(warnings)]
 
diff --git a/src/librustc_borrowck/lib.rs b/src/librustc_borrowck/lib.rs
index 7a77939faa3..e7f4f9caee3 100644
--- a/src/librustc_borrowck/lib.rs
+++ b/src/librustc_borrowck/lib.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![crate_name = "rustc_borrowck"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_const_eval/lib.rs b/src/librustc_const_eval/lib.rs
index 3483752d4ff..9fedee80d46 100644
--- a/src/librustc_const_eval/lib.rs
+++ b/src/librustc_const_eval/lib.rs
@@ -14,9 +14,6 @@
 //!
 //! This API is completely unstable and subject to change.
 
-#![crate_name = "rustc_const_eval"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_const_math/lib.rs b/src/librustc_const_math/lib.rs
index 3947edecb5a..93b70ef8e4a 100644
--- a/src/librustc_const_math/lib.rs
+++ b/src/librustc_const_math/lib.rs
@@ -14,9 +14,6 @@
 //!
 //! This API is completely unstable and subject to change.
 
-#![crate_name = "rustc_const_math"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs
index 54eed6dc92a..da00ebc4b9e 100644
--- a/src/librustc_data_structures/lib.rs
+++ b/src/librustc_data_structures/lib.rs
@@ -16,9 +16,6 @@
 //!
 //! This API is completely unstable and subject to change.
 
-#![crate_name = "rustc_data_structures"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://www.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index d7b5d4a6fe3..e56c989b843 100644
--- a/src/librustc_driver/lib.rs
+++ b/src/librustc_driver/lib.rs
@@ -14,9 +14,6 @@
 //!
 //! This API is completely unstable and subject to change.
 
-#![crate_name = "rustc_driver"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs
index 12b5ccf4837..0ce999c9b62 100644
--- a/src/librustc_errors/lib.rs
+++ b/src/librustc_errors/lib.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![crate_name = "rustc_errors"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_incremental/lib.rs b/src/librustc_incremental/lib.rs
index c68153140d9..8870033095c 100644
--- a/src/librustc_incremental/lib.rs
+++ b/src/librustc_incremental/lib.rs
@@ -10,9 +10,6 @@
 
 //! Support for serializing the dep-graph and reloading it.
 
-#![crate_name = "rustc_incremental"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_lint/lib.rs b/src/librustc_lint/lib.rs
index 755370b6465..5ef277f02ac 100644
--- a/src/librustc_lint/lib.rs
+++ b/src/librustc_lint/lib.rs
@@ -19,9 +19,6 @@
 //!
 //! This API is completely unstable and subject to change.
 
-#![crate_name = "rustc_lint"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs
index 5f12f561faf..3c3e627ee4b 100644
--- a/src/librustc_llvm/lib.rs
+++ b/src/librustc_llvm/lib.rs
@@ -13,9 +13,6 @@
 #![allow(non_snake_case)]
 #![allow(dead_code)]
 
-#![crate_name = "rustc_llvm"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_metadata/lib.rs b/src/librustc_metadata/lib.rs
index 8fd87ae88a8..7d796dbd00f 100644
--- a/src/librustc_metadata/lib.rs
+++ b/src/librustc_metadata/lib.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![crate_name = "rustc_metadata"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_mir/lib.rs b/src/librustc_mir/lib.rs
index 7aa46799924..dba625e98fd 100644
--- a/src/librustc_mir/lib.rs
+++ b/src/librustc_mir/lib.rs
@@ -14,9 +14,6 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
 
 */
 
-#![crate_name = "rustc_mir"]
-#![crate_type = "rlib"]
-#![crate_type = "dylib"]
 #![deny(warnings)]
 
 #![feature(box_patterns)]
diff --git a/src/librustc_passes/lib.rs b/src/librustc_passes/lib.rs
index 6c41aad98d5..28b99e1185b 100644
--- a/src/librustc_passes/lib.rs
+++ b/src/librustc_passes/lib.rs
@@ -14,9 +14,6 @@
 //!
 //! This API is completely unstable and subject to change.
 
-#![crate_name = "rustc_passes"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_platform_intrinsics/lib.rs b/src/librustc_platform_intrinsics/lib.rs
index ef1d9093df2..4cc65ee28e8 100644
--- a/src/librustc_platform_intrinsics/lib.rs
+++ b/src/librustc_platform_intrinsics/lib.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![crate_name = "rustc_platform_intrinsics"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![deny(warnings)]
 #![allow(bad_style)]
 
diff --git a/src/librustc_plugin/lib.rs b/src/librustc_plugin/lib.rs
index 602b71dca05..a2a6d183e9c 100644
--- a/src/librustc_plugin/lib.rs
+++ b/src/librustc_plugin/lib.rs
@@ -60,9 +60,6 @@
 //! See the [`plugin` feature](../../unstable-book/language-features/plugin.html) of
 //! the Unstable Book for more examples.
 
-#![crate_name = "rustc_plugin"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs
index eb82dddaf56..772b16bbecf 100644
--- a/src/librustc_privacy/lib.rs
+++ b/src/librustc_privacy/lib.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![crate_name = "rustc_privacy"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index bfc76ee2f74..ee349e31128 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![crate_name = "rustc_resolve"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs
index bc9d760d148..9b74df865d7 100644
--- a/src/librustc_save_analysis/lib.rs
+++ b/src/librustc_save_analysis/lib.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![crate_name = "rustc_save_analysis"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs
index 6da42caf75b..1758e331129 100644
--- a/src/librustc_trans/lib.rs
+++ b/src/librustc_trans/lib.rs
@@ -14,9 +14,6 @@
 //!
 //! This API is completely unstable and subject to change.
 
-#![crate_name = "rustc_trans"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_trans_utils/lib.rs b/src/librustc_trans_utils/lib.rs
index 81e83076f8c..90e17906328 100644
--- a/src/librustc_trans_utils/lib.rs
+++ b/src/librustc_trans_utils/lib.rs
@@ -12,9 +12,6 @@
 //!
 //! This API is completely unstable and subject to change.
 
-#![crate_name = "rustc_trans_utils"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustc_typeck/lib.rs b/src/librustc_typeck/lib.rs
index 294429b5b36..86feea13b17 100644
--- a/src/librustc_typeck/lib.rs
+++ b/src/librustc_typeck/lib.rs
@@ -63,9 +63,6 @@ This API is completely unstable and subject to change.
 
 */
 
-#![crate_name = "rustc_typeck"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs
index 1c3f296bed9..61a8165d26a 100644
--- a/src/librustdoc/lib.rs
+++ b/src/librustdoc/lib.rs
@@ -8,9 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![crate_name = "rustdoc"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs
index c3107d1f190..2e354252c15 100644
--- a/src/libserialize/lib.rs
+++ b/src/libserialize/lib.rs
@@ -14,9 +14,6 @@
 Core encoding and decoding interfaces.
 */
 
-#![crate_name = "serialize"]
-#![crate_type = "rlib"]
-#![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index 30495f29745..cf1eb5cd52e 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -209,10 +209,7 @@
 //! [other]: #what-is-in-the-standard-library-documentation
 //! [primitive types]: ../book/first-edition/primitive-types.html
 
-#![crate_name = "std"]
 #![stable(feature = "rust1", since = "1.0.0")]
-#![crate_type = "rlib"]
-#![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/libstd_unicode/lib.rs b/src/libstd_unicode/lib.rs
index d568baa2cd7..e5a114caed0 100644
--- a/src/libstd_unicode/lib.rs
+++ b/src/libstd_unicode/lib.rs
@@ -20,9 +20,7 @@
 //! provide for basic string-related manipulations. This crate does not
 //! (yet) aim to provide a full set of Unicode tables.
 
-#![crate_name = "std_unicode"]
 #![unstable(feature = "unicode", issue = "27783")]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs
index 43345b02bf6..e3c9f0a9345 100644
--- a/src/libsyntax/lib.rs
+++ b/src/libsyntax/lib.rs
@@ -14,9 +14,6 @@
 //!
 //! This API is completely unstable and subject to change.
 
-#![crate_name = "syntax"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/libsyntax_ext/lib.rs b/src/libsyntax_ext/lib.rs
index 439538a8b5e..fa39095d329 100644
--- a/src/libsyntax_ext/lib.rs
+++ b/src/libsyntax_ext/lib.rs
@@ -10,9 +10,6 @@
 
 //! Syntax extensions in the Rust compiler.
 
-#![crate_name = "syntax_ext"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs
index 2385e3509ad..d34dcfa3ed3 100644
--- a/src/libsyntax_pos/lib.rs
+++ b/src/libsyntax_pos/lib.rs
@@ -14,9 +14,6 @@
 //!
 //! This API is completely unstable and subject to change.
 
-#![crate_name = "syntax_pos"]
-#![crate_type = "dylib"]
-#![crate_type = "rlib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
       html_root_url = "https://doc.rust-lang.org/nightly/")]
diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs
index 4864e4581fa..ad0e582b1c3 100644
--- a/src/libterm/lib.rs
+++ b/src/libterm/lib.rs
@@ -40,9 +40,6 @@
 //! [win]: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682010%28v=vs.85%29.aspx
 //! [ti]: https://en.wikipedia.org/wiki/Terminfo
 
-#![crate_name = "term"]
-#![crate_type = "rlib"]
-#![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs
index 5e34688f8cb..652bfa82b5c 100644
--- a/src/libtest/lib.rs
+++ b/src/libtest/lib.rs
@@ -23,10 +23,11 @@
 // running tests while providing a base that other test frameworks may
 // build off of.
 
+// NB: this is also specified in this crate's Cargo.toml, but libsyntax contains logic specific to
+// this crate, which relies on this attribute (rather than the value of `--crate-name` passed by
+// cargo) to detect this crate.
 #![crate_name = "test"]
 #![unstable(feature = "test", issue = "27812")]
-#![crate_type = "rlib"]
-#![crate_type = "dylib"]
 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
        html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
        html_root_url = "https://doc.rust-lang.org/nightly/",
diff --git a/src/libunwind/lib.rs b/src/libunwind/lib.rs
index 2f425d8e986..461b49aa363 100644
--- a/src/libunwind/lib.rs
+++ b/src/libunwind/lib.rs
@@ -9,8 +9,6 @@
 // except according to those terms.
 
 #![no_std]
-#![crate_name = "unwind"]
-#![crate_type = "rlib"]
 #![unstable(feature = "panic_unwind", issue = "32837")]
 #![deny(warnings)]
 
diff --git a/src/test/run-make/alloc-extern-crates/Makefile b/src/test/run-make/alloc-extern-crates/Makefile
index b8c52378554..7197f4e17e3 100644
--- a/src/test/run-make/alloc-extern-crates/Makefile
+++ b/src/test/run-make/alloc-extern-crates/Makefile
@@ -2,4 +2,4 @@
 
 all:
 	$(RUSTC) fakealloc.rs
-	$(RUSTC) ../../../liballoc/lib.rs --cfg feature=\"external_crate\" --extern external=$(TMPDIR)/$(shell $(RUSTC) --print file-names fakealloc.rs)
+	$(RUSTC) --crate-type=rlib ../../../liballoc/lib.rs --cfg feature=\"external_crate\" --extern external=$(TMPDIR)/$(shell $(RUSTC) --print file-names fakealloc.rs)