3 Rust MIR: a lowered representation of Rust.
8 #![feature(in_band_lifetimes)]
9 #![feature(array_windows)]
10 #![feature(bindings_after_at)]
11 #![feature(bool_to_option)]
12 #![feature(box_patterns)]
13 #![feature(box_syntax)]
15 #![feature(const_panic)]
16 #![feature(crate_visibility_modifier)]
17 #![feature(decl_macro)]
18 #![feature(exact_size_is_empty)]
19 #![feature(exhaustive_patterns)]
20 #![feature(never_type)]
21 #![feature(min_specialization)]
22 #![feature(trusted_len)]
23 #![feature(try_blocks)]
24 #![feature(associated_type_defaults)]
25 #![feature(stmt_expr_attributes)]
26 #![feature(trait_alias)]
27 #![feature(option_expect_none)]
28 #![feature(or_patterns)]
29 #![feature(once_cell)]
30 #![feature(control_flow_enum)]
31 #![recursion_limit = "256"]
36 extern crate rustc_middle;
47 use rustc_middle::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 monomorphize::polymorphize::provide(providers);
56 providers.eval_to_const_value_raw = const_eval::eval_to_const_value_raw_provider;
57 providers.eval_to_allocation_raw = const_eval::eval_to_allocation_raw_provider;
58 providers.const_caller_location = const_eval::const_caller_location;
59 providers.mir_callgraph_reachable = transform::inline::cycle::mir_callgraph_reachable;
60 providers.mir_inliner_callees = transform::inline::cycle::mir_inliner_callees;
61 providers.destructure_const = |tcx, param_env_and_value| {
62 let (param_env, value) = param_env_and_value.into_parts();
63 const_eval::destructure_const(tcx, param_env, value)
65 providers.deref_const = |tcx, param_env_and_value| {
66 let (param_env, value) = param_env_and_value.into_parts();
67 const_eval::deref_const(tcx, param_env, value)