68 lines
1.8 KiB
Rust
Raw Normal View History

2015-08-18 17:59:21 -04:00
/*!
Rust MIR: a lowered representation of Rust. Also: an experiment!
*/
2019-02-08 19:56:52 +09:00
#![feature(nll)]
#![feature(in_band_lifetimes)]
2019-09-15 02:48:53 +02:00
#![feature(inner_deref)]
#![feature(slice_patterns)]
2019-10-08 01:14:42 +01:00
#![feature(bool_to_option)]
2016-02-11 18:05:28 +02:00
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(crate_visibility_modifier)]
2017-12-06 09:25:29 +01:00
#![feature(core_intrinsics)]
2018-09-06 15:33:54 -04:00
#![feature(const_fn)]
2017-12-06 09:25:29 +01:00
#![feature(decl_macro)]
2019-10-16 18:01:01 -07:00
#![feature(drain_filter)]
#![feature(exhaustive_patterns)]
#![feature(iter_order_by)]
#![feature(never_type)]
#![feature(specialization)]
2018-05-10 12:02:19 -06:00
#![feature(try_trait)]
#![feature(unicode_internals)]
#![feature(slice_concat_ext)]
#![feature(trusted_len)]
2019-02-08 20:08:08 +09:00
#![feature(try_blocks)]
#![feature(associated_type_bounds)]
2019-09-17 16:25:29 -07:00
#![feature(range_is_empty)]
#![feature(stmt_expr_attributes)]
2019-11-24 19:09:58 -05:00
#![feature(trait_alias)]
2019-11-26 12:02:52 -08:00
#![feature(matches_macro)]
2015-08-18 17:59:21 -04:00
2018-01-21 19:46:14 +01:00
#![recursion_limit="256"]
2015-08-18 17:59:21 -04:00
#[macro_use] extern crate log;
#[macro_use] extern crate rustc;
#[macro_use] extern crate syntax;
2015-08-18 17:59:21 -04:00
mod borrow_check;
2017-05-01 18:44:25 -04:00
mod build;
2019-09-06 14:31:09 +09:00
pub mod dataflow;
mod hair;
mod lints;
mod shim;
pub mod transform;
pub mod util;
2017-12-14 11:36:28 +01:00
pub mod interpret;
2017-10-25 15:39:54 +02:00
pub mod monomorphize;
pub mod const_eval;
2018-06-13 16:44:43 +03:00
use rustc::ty::query::Providers;
2019-02-08 06:28:15 +09:00
pub fn provide(providers: &mut Providers<'_>) {
borrow_check::provide(providers);
shim::provide(providers);
transform::provide(providers);
monomorphize::partitioning::provide(providers);
providers.const_eval_validated = const_eval::const_eval_validated_provider;
providers.const_eval_raw = const_eval::const_eval_raw_provider;
2018-01-26 16:12:07 +01:00
providers.check_match = hair::pattern::check_match;
providers.const_caller_location = const_eval::const_caller_location;
2019-05-24 14:58:37 -05:00
providers.const_field = |tcx, param_env_and_value| {
let (param_env, (value, field)) = param_env_and_value.into_parts();
const_eval::const_field(tcx, param_env, None, field, value)
};
}