88 lines
2.3 KiB
Rust
Raw Normal View History

2015-08-18 17:59:21 -04:00
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
/*!
Rust MIR: a lowered representation of Rust. Also: an experiment!
*/
#![cfg_attr(not(stage0), feature(nll))]
#![feature(infer_outlives_requirements)]
#![feature(in_band_lifetimes)]
#![feature(slice_patterns)]
#![feature(slice_sort_by_cached_key)]
2016-02-11 18:05:28 +02:00
#![feature(box_patterns)]
#![feature(box_syntax)]
2017-12-06 09:25:29 +01:00
#![feature(catch_expr)]
#![feature(crate_visibility_modifier)]
2017-12-06 09:25:29 +01:00
#![feature(const_fn)]
#![feature(core_intrinsics)]
#![feature(decl_macro)]
#![feature(macro_vis_matcher)]
#![feature(exhaustive_patterns)]
2017-12-06 09:25:29 +01:00
#![feature(range_contains)]
2016-05-07 19:14:28 +03:00
#![feature(rustc_diagnostic_macros)]
#![feature(never_type)]
#![feature(specialization)]
2018-05-10 12:02:19 -06:00
#![feature(try_trait)]
#![feature(unicode_internals)]
#![feature(step_trait)]
2015-08-18 17:59:21 -04:00
2018-01-21 19:46:14 +01:00
#![recursion_limit="256"]
extern crate arena;
2018-01-21 19:46:14 +01:00
#[macro_use]
extern crate bitflags;
2015-08-18 17:59:21 -04:00
#[macro_use] extern crate log;
2018-05-29 08:54:15 -03:00
extern crate either;
2015-08-18 17:59:21 -04:00
extern crate graphviz as dot;
2018-05-24 18:52:01 -03:00
extern crate polonius_engine;
2016-03-28 22:22:14 +02:00
#[macro_use]
extern crate rustc;
2017-12-06 09:25:29 +01:00
#[macro_use] extern crate rustc_data_structures;
extern crate serialize as rustc_serialize;
extern crate rustc_errors;
2016-05-07 19:14:28 +03:00
#[macro_use]
extern crate syntax;
extern crate syntax_pos;
extern crate rustc_target;
extern crate log_settings;
extern crate rustc_apfloat;
extern crate byteorder;
extern crate core;
2015-08-18 17:59:21 -04:00
2017-08-19 03:09:55 +03:00
mod diagnostics;
2016-05-07 19:14:28 +03:00
mod borrow_check;
2017-05-01 18:44:25 -04:00
mod build;
2017-08-19 03:09:55 +03:00
mod dataflow;
mod hair;
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;
2018-01-26 16:12:07 +01:00
pub use hair::pattern::check_crate as matchck_crate;
2018-06-13 16:44:43 +03:00
use rustc::ty::query::Providers;
pub fn provide(providers: &mut Providers) {
borrow_check::provide(providers);
shim::provide(providers);
transform::provide(providers);
providers.const_eval = interpret::const_eval_provider;
providers.const_value_to_allocation = interpret::const_value_to_allocation_provider;
2018-01-26 16:12:07 +01:00
providers.check_match = hair::pattern::check_match;
}
__build_diagnostic_array! { librustc_mir, DIAGNOSTICS }