From 348cc9418ae43527980e63f2857c56344c3374c6 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Wed, 26 Nov 2014 11:44:45 -0800 Subject: [PATCH] Remove special casing for some meta attributes Descriptions and licenses are handled by Cargo now, so there's no reason to keep these attributes around. --- src/doc/reference.md | 11 +++-------- src/liballoc/lib.rs | 1 - src/libarena/lib.rs | 1 - src/libcollections/lib.rs | 1 - src/libcore/lib.rs | 1 - src/libflate/lib.rs | 1 - src/libfmt_macros/lib.rs | 1 - src/libgetopts/lib.rs | 1 - src/libgraphviz/lib.rs | 1 - src/liblog/lib.rs | 1 - src/librand/lib.rs | 1 - src/librbml/lib.rs | 1 - src/libregex/lib.rs | 1 - src/libregex_macros/lib.rs | 1 - src/librustc/lib.rs | 2 -- src/librustc/lint/builtin.rs | 9 --------- src/librustc_back/lib.rs | 2 -- src/librustc_llvm/lib.rs | 1 - src/librustc_trans/lib.rs | 2 -- src/librustdoc/lib.rs | 2 -- src/librustrt/lib.rs | 1 - src/libserialize/lib.rs | 1 - src/libstd/lib.rs | 2 -- src/libsyntax/lib.rs | 1 - src/libterm/lib.rs | 2 -- src/libtest/lib.rs | 2 -- src/libtime/lib.rs | 1 - src/libunicode/lib.rs | 1 - 28 files changed, 3 insertions(+), 50 deletions(-) diff --git a/src/doc/reference.md b/src/doc/reference.md index f53d083ee068d..1d27ac096df8a 100644 --- a/src/doc/reference.md +++ b/src/doc/reference.md @@ -777,13 +777,8 @@ metadata that influences the behavior of the compiler. ```{.rust} # #![allow(unused_attribute)] -// Crate ID -#![crate_id = "projx#2.5"] - -// Additional metadata attributes -#![desc = "Project X"] -#![license = "BSD"] -#![comment = "This is a comment on Project X."] +// Crate name +#![crate_name = "projx"] // Specify the output type #![crate_type = "lib"] @@ -1961,7 +1956,7 @@ An example of attributes: ```{.rust} // General metadata applied to the enclosing module or crate. -#![license = "BSD"] +#![crate_type = "lib"] // A function marked as a unit test #[test] diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 173ca008d0356..0b27fbd440438 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -58,7 +58,6 @@ #![crate_name = "alloc"] #![experimental] -#![license = "MIT/ASL2"] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", diff --git a/src/libarena/lib.rs b/src/libarena/lib.rs index 33d4406b733c1..8b84ecb690455 100644 --- a/src/libarena/lib.rs +++ b/src/libarena/lib.rs @@ -23,7 +23,6 @@ #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] -#![license = "MIT/ASL2"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/")] diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index 7965ac26a62f8..1e104b314478d 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -16,7 +16,6 @@ #![crate_name = "collections"] #![experimental] #![crate_type = "rlib"] -#![license = "MIT/ASL2"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/", diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs index 5e3c74477d15c..56a8677306079 100644 --- a/src/libcore/lib.rs +++ b/src/libcore/lib.rs @@ -49,7 +49,6 @@ #![crate_name = "core"] #![experimental] -#![license = "MIT/ASL2"] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", diff --git a/src/libflate/lib.rs b/src/libflate/lib.rs index 568210118a8ae..e8eafa2576ccd 100644 --- a/src/libflate/lib.rs +++ b/src/libflate/lib.rs @@ -22,7 +22,6 @@ Simple [DEFLATE][def]-based compression. This is a wrapper around the #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] -#![license = "MIT/ASL2"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/")] diff --git a/src/libfmt_macros/lib.rs b/src/libfmt_macros/lib.rs index d3bee557220bf..6b8fafbed5d77 100644 --- a/src/libfmt_macros/lib.rs +++ b/src/libfmt_macros/lib.rs @@ -16,7 +16,6 @@ #![crate_name = "fmt_macros"] #![experimental] -#![license = "MIT/ASL2"] #![crate_type = "rlib"] #![crate_type = "dylib"] #![feature(macro_rules, globs, import_shadowing)] diff --git a/src/libgetopts/lib.rs b/src/libgetopts/lib.rs index a182f582b5f34..58769ef5a1b18 100644 --- a/src/libgetopts/lib.rs +++ b/src/libgetopts/lib.rs @@ -82,7 +82,6 @@ #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] -#![license = "MIT/ASL2"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/", diff --git a/src/libgraphviz/lib.rs b/src/libgraphviz/lib.rs index f149ec509af05..79fc9dcc9cb3d 100644 --- a/src/libgraphviz/lib.rs +++ b/src/libgraphviz/lib.rs @@ -267,7 +267,6 @@ pub fn main() { #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] -#![license = "MIT/ASL2"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/")] diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index dab033e09729e..5642ec91ba3b4 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -159,7 +159,6 @@ #![crate_name = "log"] #![experimental] -#![license = "MIT/ASL2"] #![crate_type = "rlib"] #![crate_type = "dylib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", diff --git a/src/librand/lib.rs b/src/librand/lib.rs index 1ff66d0653f96..de40ee4893d56 100644 --- a/src/librand/lib.rs +++ b/src/librand/lib.rs @@ -17,7 +17,6 @@ //! interface through `std::rand`. #![crate_name = "rand"] -#![license = "MIT/ASL2"] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", diff --git a/src/librbml/lib.rs b/src/librbml/lib.rs index 3f3f3179d27b8..6f3fbe1251008 100644 --- a/src/librbml/lib.rs +++ b/src/librbml/lib.rs @@ -19,7 +19,6 @@ #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] -#![license = "MIT/ASL2"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/", diff --git a/src/libregex/lib.rs b/src/libregex/lib.rs index d8f1eeee50b0e..b35c3879783a0 100644 --- a/src/libregex/lib.rs +++ b/src/libregex/lib.rs @@ -363,7 +363,6 @@ #![crate_type = "rlib"] #![crate_type = "dylib"] #![experimental] -#![license = "MIT/ASL2"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/", diff --git a/src/libregex_macros/lib.rs b/src/libregex_macros/lib.rs index 3cc6d361e3c58..52ec18be97981 100644 --- a/src/libregex_macros/lib.rs +++ b/src/libregex_macros/lib.rs @@ -14,7 +14,6 @@ #![crate_name = "regex_macros"] #![crate_type = "dylib"] #![experimental] -#![license = "MIT/ASL2"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/")] diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index f272bb52a1436..4894b7398cbfc 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -20,8 +20,6 @@ This API is completely unstable and subject to change. #![crate_name = "rustc"] #![experimental] -#![comment = "The Rust compiler"] -#![license = "MIT/ASL2"] #![crate_type = "dylib"] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", diff --git a/src/librustc/lint/builtin.rs b/src/librustc/lint/builtin.rs index 9fe7a21243f18..56f5fdd8f0d4b 100644 --- a/src/librustc/lint/builtin.rs +++ b/src/librustc/lint/builtin.rs @@ -635,11 +635,6 @@ impl LintPass for UnusedAttributes { // used in resolve "prelude_import", - // not used anywhere (!?) but apparently we want to keep them around - "comment", - "desc", - "license", - // FIXME: #14407 these are only looked at on-demand so we can't // guarantee they'll have already been checked "deprecated", @@ -658,10 +653,6 @@ impl LintPass for UnusedAttributes { "no_start", "no_main", "no_std", - "desc", - "comment", - "license", - "copyright", "no_builtins", ]; diff --git a/src/librustc_back/lib.rs b/src/librustc_back/lib.rs index 97d94437acd33..fc98a5cd6b559 100644 --- a/src/librustc_back/lib.rs +++ b/src/librustc_back/lib.rs @@ -23,8 +23,6 @@ #![crate_name = "rustc_back"] #![experimental] -#![comment = "The Rust compiler minimal-dependency dumping-ground"] -#![license = "MIT/ASL2"] #![crate_type = "dylib"] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", diff --git a/src/librustc_llvm/lib.rs b/src/librustc_llvm/lib.rs index d67d0fa59ae28..95d111bf49bf0 100644 --- a/src/librustc_llvm/lib.rs +++ b/src/librustc_llvm/lib.rs @@ -15,7 +15,6 @@ #![crate_name = "rustc_llvm"] #![experimental] -#![license = "MIT/ASL2"] #![crate_type = "dylib"] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs index f89580b768ea5..7efae9f0ea103 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -20,8 +20,6 @@ This API is completely unstable and subject to change. #![crate_name = "rustc_trans"] #![experimental] -#![comment = "The Rust compiler back end and driver"] -#![license = "MIT/ASL2"] #![crate_type = "dylib"] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 36e74d43e6417..7b8549c63a8bb 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -10,8 +10,6 @@ #![crate_name = "rustdoc"] #![experimental] -#![desc = "rustdoc, the Rust documentation extractor"] -#![license = "MIT/ASL2"] #![crate_type = "dylib"] #![crate_type = "rlib"] diff --git a/src/librustrt/lib.rs b/src/librustrt/lib.rs index 3d172d623501c..066e8c51aef0b 100644 --- a/src/librustrt/lib.rs +++ b/src/librustrt/lib.rs @@ -9,7 +9,6 @@ // except according to those terms. #![crate_name = "rustrt"] -#![license = "MIT/ASL2"] #![crate_type = "rlib"] #![crate_type = "dylib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", diff --git a/src/libserialize/lib.rs b/src/libserialize/lib.rs index b2a035f4ee5c6..9711d5c7209be 100644 --- a/src/libserialize/lib.rs +++ b/src/libserialize/lib.rs @@ -18,7 +18,6 @@ Core encoding and decoding interfaces. #![experimental] #![crate_type = "rlib"] #![crate_type = "dylib"] -#![license = "MIT/ASL2"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/", diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 80249808546b8..f6b73f037f25b 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -96,8 +96,6 @@ #![crate_name = "std"] #![unstable] -#![comment = "The Rust standard library"] -#![license = "MIT/ASL2"] #![crate_type = "rlib"] #![crate_type = "dylib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index c9d72603b8919..f368686451843 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -16,7 +16,6 @@ #![crate_name = "syntax"] #![experimental] -#![license = "MIT/ASL2"] #![crate_type = "dylib"] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs index 151a388a13335..f29da1870ff95 100644 --- a/src/libterm/lib.rs +++ b/src/libterm/lib.rs @@ -40,8 +40,6 @@ #![crate_name = "term"] #![experimental] -#![comment = "Simple ANSI color library"] -#![license = "MIT/ASL2"] #![crate_type = "rlib"] #![crate_type = "dylib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", diff --git a/src/libtest/lib.rs b/src/libtest/lib.rs index 9acb12c56d93f..308f4a558cf76 100644 --- a/src/libtest/lib.rs +++ b/src/libtest/lib.rs @@ -25,8 +25,6 @@ #![crate_name = "test"] #![experimental] -#![comment = "Rust internal test library only used by rustc"] -#![license = "MIT/ASL2"] #![crate_type = "rlib"] #![crate_type = "dylib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", diff --git a/src/libtime/lib.rs b/src/libtime/lib.rs index 062035c23f906..e31d0d3529306 100644 --- a/src/libtime/lib.rs +++ b/src/libtime/lib.rs @@ -16,7 +16,6 @@ #![crate_type = "rlib"] #![crate_type = "dylib"] -#![license = "MIT/ASL2"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico", html_root_url = "http://doc.rust-lang.org/nightly/", diff --git a/src/libunicode/lib.rs b/src/libunicode/lib.rs index 7e51c0d429117..66cd22dfb08c2 100644 --- a/src/libunicode/lib.rs +++ b/src/libunicode/lib.rs @@ -22,7 +22,6 @@ #![crate_name = "unicode"] #![experimental] -#![license = "MIT/ASL2"] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "http://www.rust-lang.org/favicon.ico",