]> git.lizzy.rs Git - rust.git/blob - src/librustc_mir/lib.rs
71855d3805e139c2c8e3008e85273c83fe378a46
[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
22 #![feature(associated_consts)]
23 #![feature(box_patterns)]
24 #![feature(box_syntax)]
25 #![feature(i128_type)]
26 #![feature(rustc_diagnostic_macros)]
27 #![feature(placement_in_syntax)]
28 #![feature(collection_placement)]
29 #![feature(nonzero)]
30
31 #[macro_use] extern crate log;
32 extern crate graphviz as dot;
33 #[macro_use]
34 extern crate rustc;
35 extern crate rustc_data_structures;
36 #[macro_use]
37 #[no_link]
38 extern crate rustc_bitflags;
39 #[macro_use]
40 extern crate syntax;
41 extern crate syntax_pos;
42 extern crate rustc_const_math;
43 extern crate rustc_const_eval;
44 extern crate core; // for NonZero
45
46 pub mod diagnostics;
47
48 mod build;
49 pub mod dataflow;
50 mod hair;
51 mod shim;
52 pub mod transform;
53 pub mod util;
54
55 use rustc::ty::maps::Providers;
56
57 pub fn provide(providers: &mut Providers) {
58     shim::provide(providers);
59     transform::provide(providers);
60 }