3 Rust MIR: a lowered representation of Rust. Also: an experiment!
8 #![feature(in_band_lifetimes)]
9 #![feature(inner_deref)]
10 #![cfg_attr(bootstrap, feature(slice_patterns))]
11 #![feature(bool_to_option)]
12 #![feature(box_patterns)]
13 #![feature(box_syntax)]
14 #![feature(crate_visibility_modifier)]
15 #![feature(core_intrinsics)]
16 #![feature(decl_macro)]
17 #![feature(drain_filter)]
18 #![feature(exhaustive_patterns)]
19 #![feature(iter_order_by)]
20 #![feature(never_type)]
21 #![feature(specialization)]
22 #![feature(try_trait)]
23 #![feature(unicode_internals)]
24 #![feature(slice_concat_ext)]
25 #![feature(trusted_len)]
26 #![feature(try_blocks)]
27 #![feature(associated_type_bounds)]
28 #![feature(range_is_empty)]
29 #![feature(stmt_expr_attributes)]
30 #![feature(trait_alias)]
31 #![recursion_limit = "256"]
47 use rustc::ty::query::Providers;
49 pub fn provide(providers: &mut Providers<'_>) {
50 borrow_check::provide(providers);
51 const_eval::provide(providers);
52 shim::provide(providers);
53 transform::provide(providers);
54 monomorphize::partitioning::provide(providers);
55 providers.const_eval_validated = const_eval::const_eval_validated_provider;
56 providers.const_eval_raw = const_eval::const_eval_raw_provider;
57 providers.const_caller_location = const_eval::const_caller_location;
58 providers.const_field = |tcx, param_env_and_value| {
59 let (param_env, (value, field)) = param_env_and_value.into_parts();
60 const_eval::const_field(tcx, param_env, None, field, value)
62 providers.destructure_const = |tcx, param_env_and_value| {
63 let (param_env, value) = param_env_and_value.into_parts();
64 const_eval::destructure_const(tcx, param_env, value)