]> git.lizzy.rs Git - rust.git/blob - src/librustc_mir/lib.rs
Rollup merge of #47277 - tspiteri:log-correctness, r=frewsxcv
[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 #![deny(warnings)]
18
19 #![feature(box_patterns)]
20 #![feature(box_syntax)]
21 #![feature(catch_expr)]
22 #![feature(conservative_impl_trait)]
23 #![feature(const_fn)]
24 #![feature(core_intrinsics)]
25 #![feature(decl_macro)]
26 #![feature(dyn_trait)]
27 #![feature(fs_read_write)]
28 #![feature(i128_type)]
29 #![feature(inclusive_range_syntax)]
30 #![feature(inclusive_range)]
31 #![feature(macro_vis_matcher)]
32 #![feature(match_default_bindings)]
33 #![feature(never_type)]
34 #![feature(range_contains)]
35 #![feature(rustc_diagnostic_macros)]
36 #![feature(placement_in_syntax)]
37 #![feature(collection_placement)]
38 #![feature(nonzero)]
39 #![feature(underscore_lifetimes)]
40
41 #[macro_use]
42 extern crate bitflags;
43 #[macro_use] extern crate log;
44 extern crate graphviz as dot;
45 #[macro_use]
46 extern crate rustc;
47 #[macro_use] extern crate rustc_data_structures;
48 extern crate serialize as rustc_serialize;
49 extern crate rustc_errors;
50 #[macro_use]
51 extern crate syntax;
52 extern crate syntax_pos;
53 extern crate rustc_back;
54 extern crate rustc_const_math;
55 extern crate rustc_const_eval;
56 extern crate core; // for NonZero
57 extern crate log_settings;
58 extern crate rustc_apfloat;
59 extern crate byteorder;
60 extern crate rustc_trans_utils;
61
62 mod diagnostics;
63
64 mod borrow_check;
65 mod build;
66 mod dataflow;
67 mod hair;
68 mod shim;
69 pub mod transform;
70 pub mod util;
71 pub mod interpret;
72 pub mod monomorphize;
73
74 use rustc::ty::maps::Providers;
75
76 pub fn provide(providers: &mut Providers) {
77     borrow_check::provide(providers);
78     shim::provide(providers);
79     transform::provide(providers);
80     providers.const_eval = interpret::const_eval_provider;
81 }
82
83 #[cfg(not(stage0))] // remove after the next snapshot
84 __build_diagnostic_array! { librustc_mir, DIAGNOSTICS }