]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/lib.rs
rustc_span: return an impl Iterator instead of a Vec from macro_backtrace.
[rust.git] / src / librustc_mir / lib.rs
index cf54530317c4337d94c755134469b2d26510fa12..5e42ba3279027953cefa1c0b7aa889d5804c7be7 100644 (file)
@@ -7,13 +7,12 @@
 #![feature(nll)]
 #![feature(in_band_lifetimes)]
 #![feature(inner_deref)]
-#![feature(slice_patterns)]
+#![cfg_attr(bootstrap, feature(slice_patterns))]
 #![feature(bool_to_option)]
 #![feature(box_patterns)]
 #![feature(box_syntax)]
 #![feature(crate_visibility_modifier)]
 #![feature(core_intrinsics)]
-#![feature(const_fn)]
 #![feature(decl_macro)]
 #![feature(drain_filter)]
 #![feature(exhaustive_patterns)]
 #![feature(range_is_empty)]
 #![feature(stmt_expr_attributes)]
 #![feature(trait_alias)]
-#![feature(matches_macro)]
+#![recursion_limit = "256"]
 
-#![recursion_limit="256"]
-
-#[macro_use] extern crate log;
-#[macro_use] extern crate rustc;
-#[macro_use] extern crate syntax;
+#[macro_use]
+extern crate log;
+#[macro_use]
+extern crate rustc;
 
 mod borrow_check;
-mod build;
+pub mod const_eval;
 pub mod dataflow;
-mod hair;
-mod lints;
+pub mod interpret;
+pub mod monomorphize;
 mod shim;
 pub mod transform;
 pub mod util;
-pub mod interpret;
-pub mod monomorphize;
-pub mod const_eval;
 
 use rustc::ty::query::Providers;
 
 pub fn provide(providers: &mut Providers<'_>) {
     borrow_check::provide(providers);
+    const_eval::provide(providers);
     shim::provide(providers);
     transform::provide(providers);
     monomorphize::partitioning::provide(providers);
     providers.const_eval_validated = const_eval::const_eval_validated_provider;
     providers.const_eval_raw = const_eval::const_eval_raw_provider;
-    providers.check_match = hair::pattern::check_match;
     providers.const_caller_location = const_eval::const_caller_location;
     providers.const_field = |tcx, param_env_and_value| {
         let (param_env, (value, field)) = param_env_and_value.into_parts();
         const_eval::const_field(tcx, param_env, None, field, value)
     };
+    providers.destructure_const = |tcx, param_env_and_value| {
+        let (param_env, value) = param_env_and_value.into_parts();
+        const_eval::destructure_const(tcx, param_env, value)
+    };
 }