Skip to content

Remove special casing for some meta attributes #19343

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
Show file tree
Hide file tree
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
11 changes: 3 additions & 8 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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]
Expand Down
1 change: 0 additions & 1 deletion src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/libarena/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/")]
Expand Down
1 change: 0 additions & 1 deletion src/libcollections/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down
1 change: 0 additions & 1 deletion src/libcore/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/libflate/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/")]
Expand Down
1 change: 0 additions & 1 deletion src/libfmt_macros/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#![crate_name = "fmt_macros"]
#![experimental]
#![license = "MIT/ASL2"]
#![crate_type = "rlib"]
#![crate_type = "dylib"]
#![feature(macro_rules, globs, import_shadowing)]
Expand Down
1 change: 0 additions & 1 deletion src/libgetopts/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down
1 change: 0 additions & 1 deletion src/libgraphviz/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/")]
Expand Down
1 change: 0 additions & 1 deletion src/liblog/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/librand/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/librbml/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down
1 change: 0 additions & 1 deletion src/libregex/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down
1 change: 0 additions & 1 deletion src/libregex_macros/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/")]
Expand Down
2 changes: 0 additions & 2 deletions src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 0 additions & 9 deletions src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -658,10 +653,6 @@ impl LintPass for UnusedAttributes {
"no_start",
"no_main",
"no_std",
"desc",
"comment",
"license",
"copyright",
"no_builtins",
];

Expand Down
2 changes: 0 additions & 2 deletions src/librustc_back/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/librustc_llvm/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions src/librustc_trans/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

#![crate_name = "rustdoc"]
#![experimental]
#![desc = "rustdoc, the Rust documentation extractor"]
#![license = "MIT/ASL2"]
#![crate_type = "dylib"]
#![crate_type = "rlib"]

Expand Down
1 change: 0 additions & 1 deletion src/librustrt/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/libserialize/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down
2 changes: 0 additions & 2 deletions src/libstd/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/libsyntax/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions src/libterm/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 0 additions & 2 deletions src/libtest/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/libtime/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down
1 change: 0 additions & 1 deletion src/libunicode/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down