]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/lib.rs
Rollup merge of #61420 - felixrabe:patch-2, r=dtolnay
[rust.git] / src / librustc_mir / lib.rs
index deeed9a0b9846ecc4892e66fc5de96f3c8550ea0..9213a009ea740374641900fa189a332c0c2b5f1e 100644 (file)
 #![feature(unicode_internals)]
 #![feature(step_trait)]
 #![feature(slice_concat_ext)]
-#![feature(reverse_bits)]
 #![feature(try_blocks)]
 
 #![recursion_limit="256"]
 
 #![deny(rust_2018_idioms)]
-#![cfg_attr(not(stage0), deny(internal))]
+#![deny(internal)]
 #![allow(explicit_outlives_requirements)]
 
 #[macro_use] extern crate log;
@@ -40,7 +39,7 @@
 #[macro_use]
 extern crate syntax;
 
-mod diagnostics;
+mod error_codes;
 
 mod borrow_check;
 mod build;
@@ -64,6 +63,11 @@ pub fn provide(providers: &mut Providers<'_>) {
     providers.const_eval = const_eval::const_eval_provider;
     providers.const_eval_raw = const_eval::const_eval_raw_provider;
     providers.check_match = hair::pattern::check_match;
+    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.type_name = interpret::type_name;
 }
 
 __build_diagnostic_array! { librustc_mir, DIAGNOSTICS }