3 Rust MIR: a lowered representation of Rust. Also: an experiment!
8 #![feature(in_band_lifetimes)]
9 #![feature(bool_to_option)]
10 #![feature(box_patterns)]
11 #![feature(box_syntax)]
12 #![feature(crate_visibility_modifier)]
13 #![feature(drain_filter)]
14 #![feature(exhaustive_patterns)]
15 #![feature(iter_order_by)]
16 #![feature(never_type)]
17 #![feature(specialization)]
18 #![feature(trusted_len)]
19 #![feature(try_blocks)]
20 #![feature(associated_type_bounds)]
21 #![feature(range_is_empty)]
22 #![feature(stmt_expr_attributes)]
23 #![feature(trait_alias)]
24 #![recursion_limit = "256"]
40 use rustc::ty::query::Providers;
42 pub fn provide(providers: &mut Providers<'_>) {
43 borrow_check::provide(providers);
44 const_eval::provide(providers);
45 shim::provide(providers);
46 transform::provide(providers);
47 monomorphize::partitioning::provide(providers);
48 providers.const_eval_validated = const_eval::const_eval_validated_provider;
49 providers.const_eval_raw = const_eval::const_eval_raw_provider;
50 providers.const_caller_location = const_eval::const_caller_location;
51 providers.const_field = |tcx, param_env_and_value| {
52 let (param_env, (value, field)) = param_env_and_value.into_parts();
53 const_eval::const_field(tcx, param_env, None, field, value)
55 providers.destructure_const = |tcx, param_env_and_value| {
56 let (param_env, value) = param_env_and_value.into_parts();
57 const_eval::destructure_const(tcx, param_env, value)