2015-08-18 23:59:21 +02: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!
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#![crate_name = "rustc_mir"]
|
|
|
|
#![crate_type = "rlib"]
|
|
|
|
#![crate_type = "dylib"]
|
2016-12-29 18:47:34 +01:00
|
|
|
#![deny(warnings)]
|
2016-01-22 19:17:07 +01:00
|
|
|
#![unstable(feature = "rustc_private", issue = "27812")]
|
2015-08-18 23:59:21 +02:00
|
|
|
|
2016-05-07 18:14:28 +02:00
|
|
|
#![feature(associated_consts)]
|
2016-02-11 17:05:28 +01:00
|
|
|
#![feature(box_patterns)]
|
2017-02-07 22:46:21 +01:00
|
|
|
#![feature(box_syntax)]
|
2017-03-08 17:33:21 +01:00
|
|
|
#![cfg_attr(stage0, feature(field_init_shorthand))]
|
2017-02-02 00:57:50 +01:00
|
|
|
#![feature(i128_type)]
|
2016-05-07 18:14:28 +02:00
|
|
|
#![feature(rustc_diagnostic_macros)]
|
2015-08-18 23:59:21 +02:00
|
|
|
#![feature(rustc_private)]
|
2016-01-22 19:17:07 +01:00
|
|
|
#![feature(staged_api)]
|
2017-02-02 01:05:56 +01:00
|
|
|
#![feature(placement_in_syntax)]
|
|
|
|
#![feature(collection_placement)]
|
2015-08-18 23:59:21 +02:00
|
|
|
|
|
|
|
#[macro_use] extern crate log;
|
|
|
|
extern crate graphviz as dot;
|
2016-03-28 22:22:14 +02:00
|
|
|
#[macro_use]
|
2015-10-05 18:31:48 +02:00
|
|
|
extern crate rustc;
|
2015-08-18 23:59:21 +02:00
|
|
|
extern crate rustc_data_structures;
|
2016-05-07 18:14:28 +02:00
|
|
|
#[macro_use]
|
|
|
|
#[no_link]
|
|
|
|
extern crate rustc_bitflags;
|
|
|
|
#[macro_use]
|
2015-10-05 18:31:48 +02:00
|
|
|
extern crate syntax;
|
2016-06-22 00:08:13 +02:00
|
|
|
extern crate syntax_pos;
|
2016-03-15 12:33:13 +01:00
|
|
|
extern crate rustc_const_math;
|
2016-03-30 13:43:36 +02:00
|
|
|
extern crate rustc_const_eval;
|
2015-08-18 23:59:21 +02:00
|
|
|
|
2016-05-07 18:14:28 +02:00
|
|
|
pub mod diagnostics;
|
|
|
|
|
2015-08-18 23:59:21 +02:00
|
|
|
pub mod build;
|
2017-02-08 10:24:49 +01:00
|
|
|
pub mod callgraph;
|
2016-09-16 03:18:40 +02:00
|
|
|
pub mod def_use;
|
2015-12-30 03:06:19 +01:00
|
|
|
pub mod graphviz;
|
2015-10-21 23:24:05 +02:00
|
|
|
mod hair;
|
2017-02-07 22:46:21 +01:00
|
|
|
mod shim;
|
2015-12-30 03:06:19 +01:00
|
|
|
pub mod mir_map;
|
|
|
|
pub mod pretty;
|
2015-11-10 21:38:36 +01:00
|
|
|
pub mod transform;
|
2016-09-16 03:18:40 +02:00
|
|
|
|
2017-02-20 02:55:28 +01:00
|
|
|
use rustc::ty::maps::Providers;
|
|
|
|
|
|
|
|
pub fn provide(providers: &mut Providers) {
|
|
|
|
mir_map::provide(providers);
|
2017-02-08 18:31:03 +01:00
|
|
|
shim::provide(providers);
|
2017-02-20 02:55:28 +01:00
|
|
|
transform::qualify_consts::provide(providers);
|
2017-02-08 10:24:49 +01:00
|
|
|
}
|