Auto merge of #43994 - tamird:remove-attributes, r=alexcrichton
*: remove crate_{name,type} attributes Fixes #41701. r? @arielb1
This commit is contained in:
commit
83fcd4dbba
@ -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 \
|
||||
|
@ -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 \
|
||||
|
@ -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",
|
||||
|
@ -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/",
|
||||
|
@ -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 \
|
||||
|
@ -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/",
|
||||
|
@ -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/",
|
||||
|
@ -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/",
|
||||
|
@ -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/",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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)]
|
||||
|
@ -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/",
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -9,8 +9,6 @@
|
||||
// except according to those terms.
|
||||
|
||||
|
||||
#![crate_name = "rustc_bitflags"]
|
||||
#![crate_type = "rlib"]
|
||||
#![no_std]
|
||||
#![deny(warnings)]
|
||||
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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)]
|
||||
|
@ -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/")]
|
||||
|
@ -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)]
|
||||
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/",
|
||||
|
@ -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/",
|
||||
|
@ -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/",
|
||||
|
@ -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/",
|
||||
|
@ -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/",
|
||||
|
@ -56,13 +56,12 @@ struct Test {
|
||||
}
|
||||
|
||||
struct TestCtxt<'a> {
|
||||
sess: &'a ParseSess,
|
||||
span_diagnostic: &'a errors::Handler,
|
||||
path: Vec<Ident>,
|
||||
ext_cx: ExtCtxt<'a>,
|
||||
testfns: Vec<Test>,
|
||||
reexport_test_harness_main: Option<Symbol>,
|
||||
is_test_crate: bool,
|
||||
is_libtest: bool,
|
||||
ctxt: SyntaxContext,
|
||||
|
||||
// top-level re-export submodule, filled out after folding is finished
|
||||
@ -272,14 +271,15 @@ fn generate_test_harness(sess: &ParseSess,
|
||||
let krate = cleaner.fold_crate(krate);
|
||||
|
||||
let mark = Mark::fresh(Mark::root());
|
||||
|
||||
let mut cx: TestCtxt = TestCtxt {
|
||||
sess,
|
||||
span_diagnostic: sd,
|
||||
ext_cx: ExtCtxt::new(sess, ExpansionConfig::default("test".to_string()), resolver),
|
||||
path: Vec::new(),
|
||||
testfns: Vec::new(),
|
||||
reexport_test_harness_main,
|
||||
is_test_crate: is_test_crate(&krate),
|
||||
// NB: doesn't consider the value of `--crate-name` passed on the command line.
|
||||
is_libtest: attr::find_crate_name(&krate.attrs).map(|s| s == "test").unwrap_or(false),
|
||||
toplevel_reexport: None,
|
||||
ctxt: SyntaxContext::empty().apply_mark(mark),
|
||||
};
|
||||
@ -454,7 +454,7 @@ mod __test {
|
||||
fn mk_std(cx: &TestCtxt) -> P<ast::Item> {
|
||||
let id_test = Ident::from_str("test");
|
||||
let sp = ignored_span(cx, DUMMY_SP);
|
||||
let (vi, vis, ident) = if cx.is_test_crate {
|
||||
let (vi, vis, ident) = if cx.is_libtest {
|
||||
(ast::ItemKind::Use(
|
||||
P(nospan(ast::ViewPathSimple(id_test,
|
||||
path_node(vec![id_test]))))),
|
||||
@ -608,13 +608,6 @@ fn mk_tests(cx: &TestCtxt) -> P<ast::Item> {
|
||||
test_descs)
|
||||
}
|
||||
|
||||
fn is_test_crate(krate: &ast::Crate) -> bool {
|
||||
match attr::find_crate_name(&krate.attrs) {
|
||||
Some(s) if "test" == s.as_str() => true,
|
||||
_ => false
|
||||
}
|
||||
}
|
||||
|
||||
fn mk_test_descs(cx: &TestCtxt) -> P<ast::Expr> {
|
||||
debug!("building test vector from {} tests", cx.testfns.len());
|
||||
|
||||
|
@ -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/")]
|
||||
|
@ -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/")]
|
||||
|
@ -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/",
|
||||
|
@ -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/",
|
||||
|
@ -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)]
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user