3 Rust MIR: a lowered representation of Rust. Also: an experiment!
8 #![feature(in_band_lifetimes)]
9 #![feature(inner_deref)]
10 #![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"]
50 use rustc::ty::query::Providers;
52 pub fn provide(providers: &mut Providers<'_>) {
53 borrow_check::provide(providers);
54 const_eval::provide(providers);
55 shim::provide(providers);
56 transform::provide(providers);
57 monomorphize::partitioning::provide(providers);
58 providers.const_eval_validated = const_eval::const_eval_validated_provider;
59 providers.const_eval_raw = const_eval::const_eval_raw_provider;
60 providers.check_match = hair::pattern::check_match;
61 providers.const_caller_location = const_eval::const_caller_location;
62 providers.const_field = |tcx, param_env_and_value| {
63 let (param_env, (value, field)) = param_env_and_value.into_parts();
64 const_eval::const_field(tcx, param_env, None, field, value)