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!
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2016-12-29 09:47:34 -08:00
|
|
|
#![deny(warnings)]
|
2015-08-18 17:59:21 -04:00
|
|
|
|
2017-12-27 21:32:01 +01:00
|
|
|
#![feature(slice_patterns)]
|
|
|
|
#![feature(from_ref)]
|
2016-02-11 18:05:28 +02:00
|
|
|
#![feature(box_patterns)]
|
2017-02-07 22:46:21 +01:00
|
|
|
#![feature(box_syntax)]
|
2017-12-06 09:25:29 +01:00
|
|
|
#![feature(catch_expr)]
|
|
|
|
#![feature(conservative_impl_trait)]
|
|
|
|
#![feature(const_fn)]
|
|
|
|
#![feature(core_intrinsics)]
|
|
|
|
#![feature(decl_macro)]
|
2017-12-12 17:29:37 -03:00
|
|
|
#![feature(dyn_trait)]
|
2018-01-10 08:58:39 -08:00
|
|
|
#![feature(fs_read_write)]
|
2017-02-01 15:57:50 -08:00
|
|
|
#![feature(i128_type)]
|
2017-12-06 09:25:29 +01:00
|
|
|
#![feature(inclusive_range_syntax)]
|
2017-12-12 17:14:49 +01:00
|
|
|
#![feature(inclusive_range)]
|
|
|
|
#![feature(macro_vis_matcher)]
|
2017-12-06 09:25:29 +01:00
|
|
|
#![feature(match_default_bindings)]
|
2017-12-12 17:14:49 +01:00
|
|
|
#![feature(never_type)]
|
2017-12-06 09:25:29 +01:00
|
|
|
#![feature(range_contains)]
|
2016-05-07 19:14:28 +03:00
|
|
|
#![feature(rustc_diagnostic_macros)]
|
2017-02-02 02:05:56 +02:00
|
|
|
#![feature(placement_in_syntax)]
|
|
|
|
#![feature(collection_placement)]
|
2017-06-26 14:57:26 +02:00
|
|
|
#![feature(nonzero)]
|
2017-12-06 09:25:29 +01:00
|
|
|
#![feature(underscore_lifetimes)]
|
2015-08-18 17:59:21 -04:00
|
|
|
|
2017-12-27 21:32:01 +01:00
|
|
|
extern crate arena;
|
2017-09-08 15:08:01 -04:00
|
|
|
#[macro_use]
|
|
|
|
extern crate bitflags;
|
2015-08-18 17:59:21 -04:00
|
|
|
#[macro_use] extern crate log;
|
|
|
|
extern crate graphviz as dot;
|
2016-03-28 22:22:14 +02:00
|
|
|
#[macro_use]
|
2015-10-05 12:31:48 -04:00
|
|
|
extern crate rustc;
|
2017-12-06 09:25:29 +01:00
|
|
|
#[macro_use] extern crate rustc_data_structures;
|
|
|
|
extern crate serialize as rustc_serialize;
|
2017-07-03 17:25:03 +02:00
|
|
|
extern crate rustc_errors;
|
2016-05-07 19:14:28 +03:00
|
|
|
#[macro_use]
|
2015-10-05 12:31:48 -04:00
|
|
|
extern crate syntax;
|
2016-06-21 18:08:13 -04:00
|
|
|
extern crate syntax_pos;
|
2017-12-19 01:59:29 +01:00
|
|
|
extern crate rustc_back;
|
2016-03-15 12:33:13 +01:00
|
|
|
extern crate rustc_const_math;
|
2017-06-26 14:57:26 +02:00
|
|
|
extern crate core; // for NonZero
|
2017-12-12 17:14:49 +01:00
|
|
|
extern crate log_settings;
|
|
|
|
extern crate rustc_apfloat;
|
|
|
|
extern crate byteorder;
|
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
|
|
|
|
2017-08-21 10:24:12 +02:00
|
|
|
mod borrow_check;
|
2017-05-01 18:44:25 -04:00
|
|
|
mod build;
|
2017-08-19 03:09:55 +03:00
|
|
|
mod dataflow;
|
2015-10-21 17:24:05 -04:00
|
|
|
mod hair;
|
2017-02-07 22:46:21 +01:00
|
|
|
mod shim;
|
2015-11-10 21:38:36 +01:00
|
|
|
pub mod transform;
|
2017-03-09 20:10:05 +02:00
|
|
|
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;
|
2017-12-27 21:32:01 +01:00
|
|
|
pub mod const_eval;
|
2016-09-15 18:18:40 -07:00
|
|
|
|
2017-02-20 03:55:28 +02:00
|
|
|
use rustc::ty::maps::Providers;
|
|
|
|
|
|
|
|
pub fn provide(providers: &mut Providers) {
|
2017-08-21 10:24:12 +02:00
|
|
|
borrow_check::provide(providers);
|
2017-02-08 18:31:03 +01:00
|
|
|
shim::provide(providers);
|
2017-04-27 16:48:48 -04:00
|
|
|
transform::provide(providers);
|
2017-12-12 17:14:49 +01:00
|
|
|
providers.const_eval = interpret::const_eval_provider;
|
2017-12-27 21:32:01 +01:00
|
|
|
providers.check_match = const_eval::check_match::check_match;
|
2017-03-14 12:22:38 -07:00
|
|
|
}
|
2017-07-30 23:22:09 -07:00
|
|
|
|
|
|
|
__build_diagnostic_array! { librustc_mir, DIAGNOSTICS }
|