X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=src%2Flibrustc%2Flib.rs;h=82f01c36fee7f6960d6942bae39cd20b4402ee5c;hb=3b2f29766f50d6e3cd1126618408f62575f617e5;hp=cc0cf8358228c5959f3004f2d774db7d24bf697d;hpb=c1a9b12dc94607f2d0cec7929de9ba4c085f47f1;p=rustc.git diff --git a/src/librustc/lib.rs b/src/librustc/lib.rs index cc0cf83582..82f01c36fe 100644 --- a/src/librustc/lib.rs +++ b/src/librustc/lib.rs @@ -14,78 +14,58 @@ //! //! This API is completely unstable and subject to change. -// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364) -#![cfg_attr(stage0, feature(custom_attribute))] -#![crate_name = "rustc"] -#![unstable(feature = "rustc_private")] -#![staged_api] -#![crate_type = "dylib"] -#![crate_type = "rlib"] -#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", - html_favicon_url = "https://doc.rust-lang.org/favicon.ico", - html_root_url = "http://doc.rust-lang.org/nightly/")] - -#![feature(append)] -#![feature(associated_consts)] +#![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/")] +#![deny(warnings)] + #![feature(box_patterns)] #![feature(box_syntax)] -#![feature(clone_from_slice)] -#![feature(collections)] +#![feature(conservative_impl_trait)] #![feature(const_fn)] -#![feature(duration_span)] -#![feature(dynamic_lib)] -#![feature(enumset)] -#![feature(fs_canonicalize)] -#![feature(hashmap_hasher)] -#![feature(into_cow)] -#![feature(iter_cmp)] -#![feature(iter_arith)] -#![feature(libc)] -#![feature(num_bits_bytes)] -#![feature(path_ext)] +#![feature(core_intrinsics)] +#![feature(i128_type)] +#![cfg_attr(windows, feature(libc))] +#![feature(never_type)] +#![feature(nonzero)] #![feature(quote)] -#![feature(range_inclusive)] -#![feature(ref_slice)] #![feature(rustc_diagnostic_macros)] -#![feature(rustc_private)] -#![feature(scoped_tls)] -#![feature(slice_bytes)] -#![feature(slice_splits)] #![feature(slice_patterns)] -#![feature(staged_api)] -#![feature(str_char)] -#![feature(str_match_indices)] -#![feature(vec_push_all)] -#![feature(wrapping)] -#![feature(cell_extras)] -#![feature(page_size)] -#![cfg_attr(test, feature(test))] +#![feature(specialization)] +#![feature(unboxed_closures)] +#![feature(trace_macros)] +#![feature(test)] -#![allow(trivial_casts)] +#![recursion_limit="256"] extern crate arena; -extern crate flate; +extern crate core; extern crate fmt_macros; extern crate getopts; extern crate graphviz; +#[cfg(windows)] extern crate libc; -extern crate rustc_llvm; +extern crate owning_ref; extern crate rustc_back; extern crate rustc_data_structures; extern crate serialize; -extern crate rbml; -extern crate collections; +extern crate rustc_const_math; +extern crate rustc_errors as errors; #[macro_use] extern crate log; #[macro_use] extern crate syntax; +extern crate syntax_pos; #[macro_use] #[no_link] extern crate rustc_bitflags; +extern crate jobserver; extern crate serialize as rustc_serialize; // used by deriving -#[cfg(test)] +// Note that librustc doesn't actually depend on these crates, see the note in +// `Cargo.toml` for this crate about why these are here. +#[allow(unused_extern_crates)] +extern crate flate2; +#[allow(unused_extern_crates)] extern crate test; -pub use rustc_llvm as llvm; - #[macro_use] mod macros; @@ -93,80 +73,49 @@ mod macros; // registered before they are used. pub mod diagnostics; -pub mod back { - pub use rustc_back::abi; - pub use rustc_back::rpath; - pub use rustc_back::svh; -} - -pub mod ast_map; +pub mod cfg; +pub mod dep_graph; +pub mod hir; +pub mod ich; +pub mod infer; +pub mod lint; pub mod middle { - pub mod astconv_util; - pub mod astencode; - pub mod cast; - pub mod cfg; - pub mod check_const; - pub mod check_static_recursion; - pub mod check_loop; - pub mod check_match; - pub mod check_rvalues; - pub mod const_eval; + pub mod allocator; + pub mod expr_use_visitor; + pub mod const_val; + pub mod cstore; pub mod dataflow; pub mod dead; - pub mod def; pub mod dependency_format; pub mod effect; pub mod entry; - pub mod expr_use_visitor; - pub mod fast_reject; pub mod free_region; pub mod intrinsicck; - pub mod infer; - pub mod implicator; pub mod lang_items; pub mod liveness; pub mod mem_categorization; - pub mod pat_util; pub mod privacy; pub mod reachable; pub mod region; pub mod recursion_limit; pub mod resolve_lifetime; pub mod stability; - pub mod subst; - pub mod traits; - pub mod ty; - pub mod ty_fold; - pub mod ty_match; - pub mod ty_relate; - pub mod ty_walk; pub mod weak_lang_items; } -pub mod metadata; - +pub mod mir; pub mod session; - -pub mod plugin; - -pub mod lint; +pub mod traits; +pub mod ty; pub mod util { - pub use rustc_back::sha2; - pub mod common; pub mod ppaux; pub mod nodemap; - pub mod lev_distance; - pub mod num; pub mod fs; } -pub mod lib { - pub use llvm; -} - // A private module so that macro-expanded idents like // `::rustc::lint::Lint` will also work in `rustc` itself. // @@ -176,5 +125,18 @@ mod rustc { pub use lint; } +// FIXME(#27438): right now the unit tests of librustc don't refer to any actual +// functions generated in librustc_data_structures (all +// references are through generic functions), but statics are +// referenced from time to time. Due to this bug we won't +// actually correctly link in the statics unless we also +// reference a function, so be sure to reference a dummy +// function. +#[test] +fn noop() { + rustc_data_structures::__noop_fix_for_27438(); +} + + // Build the diagnostics array at the end so that the metadata includes error use sites. __build_diagnostic_array! { librustc, DIAGNOSTICS }