]> git.lizzy.rs Git - rust.git/blob - src/librustc_mir/lib.rs
2718a0204a1ed07926a3921d5cf2e245617cf28a
[rust.git] / src / librustc_mir / lib.rs
1 // Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 /*!
12
13 Rust MIR: a lowered representation of Rust. Also: an experiment!
14
15 */
16
17 #![crate_name = "rustc_mir"]
18 #![crate_type = "rlib"]
19 #![crate_type = "dylib"]
20 #![deny(warnings)]
21 #![unstable(feature = "rustc_private", issue = "27812")]
22
23 #![feature(associated_consts)]
24 #![feature(box_patterns)]
25 #![feature(box_syntax)]
26 #![cfg_attr(stage0, feature(field_init_shorthand))]
27 #![feature(i128_type)]
28 #![feature(rustc_diagnostic_macros)]
29 #![feature(rustc_private)]
30 #![feature(staged_api)]
31 #![feature(placement_in_syntax)]
32 #![feature(collection_placement)]
33
34 #[macro_use] extern crate log;
35 extern crate graphviz as dot;
36 #[macro_use]
37 extern crate rustc;
38 extern crate rustc_data_structures;
39 #[macro_use]
40 #[no_link]
41 extern crate rustc_bitflags;
42 #[macro_use]
43 extern crate syntax;
44 extern crate syntax_pos;
45 extern crate rustc_const_math;
46 extern crate rustc_const_eval;
47
48 pub mod diagnostics;
49
50 pub mod build;
51 pub mod callgraph;
52 pub mod def_use;
53 pub mod graphviz;
54 mod hair;
55 mod shim;
56 pub mod mir_map;
57 pub mod pretty;
58 pub mod transform;
59
60 use rustc::ty::maps::Providers;
61
62 pub fn provide(providers: &mut Providers) {
63     mir_map::provide(providers);
64     shim::provide(providers);
65     transform::qualify_consts::provide(providers);
66 }