2015-08-18 23:59:21 +02:00
|
|
|
/*!
|
|
|
|
|
2020-02-21 15:03:21 +01:00
|
|
|
Rust MIR: a lowered representation of Rust.
|
2015-08-18 23:59:21 +02:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
2019-02-08 11:56:52 +01:00
|
|
|
#![feature(nll)]
|
2018-07-26 05:54:31 +02:00
|
|
|
#![feature(in_band_lifetimes)]
|
2019-10-08 02:14:42 +02:00
|
|
|
#![feature(bool_to_option)]
|
2016-02-11 17:05:28 +01:00
|
|
|
#![feature(box_patterns)]
|
2017-02-07 22:46:21 +01:00
|
|
|
#![feature(box_syntax)]
|
2020-03-10 21:41:33 +01:00
|
|
|
#![feature(const_fn)]
|
|
|
|
#![feature(const_panic)]
|
2018-04-06 21:18:01 +02:00
|
|
|
#![feature(crate_visibility_modifier)]
|
2020-04-27 19:01:30 +02:00
|
|
|
#![feature(decl_macro)]
|
2019-10-17 03:01:01 +02:00
|
|
|
#![feature(drain_filter)]
|
2020-08-28 08:02:46 +02:00
|
|
|
#![feature(exact_size_is_empty)]
|
2018-01-21 09:44:41 +01:00
|
|
|
#![feature(exhaustive_patterns)]
|
2019-11-10 10:26:33 +01:00
|
|
|
#![feature(iter_order_by)]
|
2019-12-11 15:55:29 +01:00
|
|
|
#![feature(never_type)]
|
2020-05-09 13:59:21 +02:00
|
|
|
#![feature(min_specialization)]
|
2019-05-26 10:55:50 +02:00
|
|
|
#![feature(trusted_len)]
|
2019-02-08 12:08:08 +01:00
|
|
|
#![feature(try_blocks)]
|
2019-07-31 21:00:35 +02:00
|
|
|
#![feature(associated_type_bounds)]
|
2020-03-22 20:09:40 +01:00
|
|
|
#![feature(associated_type_defaults)]
|
2019-09-25 23:06:00 +02:00
|
|
|
#![feature(stmt_expr_attributes)]
|
2019-11-25 01:09:58 +01:00
|
|
|
#![feature(trait_alias)]
|
2020-03-25 18:07:08 +01:00
|
|
|
#![feature(option_expect_none)]
|
2020-04-07 23:57:26 +02:00
|
|
|
#![feature(or_patterns)]
|
2019-12-22 23:42:04 +01:00
|
|
|
#![recursion_limit = "256"]
|
2015-08-18 23:59:21 +02:00
|
|
|
|
2019-12-22 23:42:04 +01:00
|
|
|
#[macro_use]
|
2020-08-14 08:05:01 +02:00
|
|
|
extern crate tracing;
|
2019-12-22 23:42:04 +01:00
|
|
|
#[macro_use]
|
2020-03-29 16:41:09 +02:00
|
|
|
extern crate rustc_middle;
|
2015-08-18 23:59:21 +02:00
|
|
|
|
2017-08-21 10:24:12 +02:00
|
|
|
mod borrow_check;
|
2019-12-22 23:42:04 +01:00
|
|
|
pub mod const_eval;
|
2019-09-06 07:31:09 +02:00
|
|
|
pub mod dataflow;
|
2019-12-22 23:42:04 +01:00
|
|
|
pub mod interpret;
|
|
|
|
pub mod monomorphize;
|
2017-02-07 22:46:21 +01:00
|
|
|
mod shim;
|
2015-11-10 21:38:36 +01:00
|
|
|
pub mod transform;
|
2017-03-09 19:10:05 +01:00
|
|
|
pub mod util;
|
2016-09-16 03:18:40 +02:00
|
|
|
|
2020-03-29 16:41:09 +02:00
|
|
|
use rustc_middle::ty::query::Providers;
|
2017-02-20 02:55:28 +01:00
|
|
|
|
2020-07-05 22:00:14 +02:00
|
|
|
pub fn provide(providers: &mut Providers) {
|
2017-08-21 10:24:12 +02:00
|
|
|
borrow_check::provide(providers);
|
2020-01-01 18:06:00 +01:00
|
|
|
const_eval::provide(providers);
|
2017-02-08 18:31:03 +01:00
|
|
|
shim::provide(providers);
|
2017-04-27 22:48:48 +02:00
|
|
|
transform::provide(providers);
|
2018-10-25 14:49:51 +02:00
|
|
|
monomorphize::partitioning::provide(providers);
|
2020-06-22 14:57:03 +02:00
|
|
|
monomorphize::polymorphize::provide(providers);
|
2020-08-10 15:11:40 +02:00
|
|
|
providers.const_eval_for_ty = const_eval::const_eval_for_ty_provider;
|
|
|
|
providers.const_eval = const_eval::const_eval_provider;
|
2019-10-25 02:35:02 +02:00
|
|
|
providers.const_caller_location = const_eval::const_caller_location;
|
2020-01-05 16:46:44 +01:00
|
|
|
providers.destructure_const = |tcx, param_env_and_value| {
|
|
|
|
let (param_env, value) = param_env_and_value.into_parts();
|
|
|
|
const_eval::destructure_const(tcx, param_env, value)
|
2020-01-11 03:22:36 +01:00
|
|
|
};
|
2017-03-14 20:22:38 +01:00
|
|
|
}
|