3 Rust MIR: a lowered representation of Rust.
8 #![feature(in_band_lifetimes)]
9 #![feature(bool_to_option)]
10 #![feature(box_patterns)]
11 #![feature(box_syntax)]
12 #![feature(const_if_match)]
14 #![feature(const_panic)]
15 #![feature(crate_visibility_modifier)]
16 #![feature(drain_filter)]
17 #![feature(exhaustive_patterns)]
18 #![feature(iter_order_by)]
19 #![feature(never_type)]
20 #![feature(specialization)]
21 #![feature(trusted_len)]
22 #![feature(try_blocks)]
23 #![feature(associated_type_bounds)]
24 #![feature(range_is_empty)]
25 #![feature(stmt_expr_attributes)]
26 #![feature(trait_alias)]
27 #![feature(option_expect_none)]
28 #![feature(or_patterns)]
29 #![recursion_limit = "256"]
34 extern crate rustc_middle
;
45 use rustc_middle
::ty
::query
::Providers
;
47 pub fn provide(providers
: &mut Providers
<'_
>) {
48 borrow_check
::provide(providers
);
49 const_eval
::provide(providers
);
50 shim
::provide(providers
);
51 transform
::provide(providers
);
52 monomorphize
::partitioning
::provide(providers
);
53 providers
.const_eval_validated
= const_eval
::const_eval_validated_provider
;
54 providers
.const_eval_raw
= const_eval
::const_eval_raw_provider
;
55 providers
.const_caller_location
= const_eval
::const_caller_location
;
56 providers
.const_field
= |tcx
, param_env_and_value
| {
57 let (param_env
, (value
, field
)) = param_env_and_value
.into_parts();
58 const_eval
::const_field(tcx
, param_env
, None
, field
, value
)
60 providers
.destructure_const
= |tcx
, param_env_and_value
| {
61 let (param_env
, value
) = param_env_and_value
.into_parts();
62 const_eval
::destructure_const(tcx
, param_env
, value
)