]> git.lizzy.rs Git - rust.git/blob - src/librustc_mir/lib.rs
Remove weasel word in docs for iter's take_while()
[rust.git] / src / librustc_mir / lib.rs
1 /*!
2
3 Rust MIR: a lowered representation of Rust. Also: an experiment!
4
5 */
6
7 #![feature(nll)]
8 #![feature(in_band_lifetimes)]
9 #![feature(slice_patterns)]
10 #![feature(slice_sort_by_cached_key)]
11 #![feature(box_patterns)]
12 #![feature(box_syntax)]
13 #![feature(crate_visibility_modifier)]
14 #![feature(core_intrinsics)]
15 #![feature(const_fn)]
16 #![feature(decl_macro)]
17 #![feature(exhaustive_patterns)]
18 #![feature(range_contains)]
19 #![feature(rustc_diagnostic_macros)]
20 #![feature(rustc_attrs)]
21 #![feature(never_type)]
22 #![feature(specialization)]
23 #![feature(try_trait)]
24 #![feature(unicode_internals)]
25 #![feature(step_trait)]
26 #![feature(slice_concat_ext)]
27 #![feature(try_from)]
28 #![feature(reverse_bits)]
29
30 #![recursion_limit="256"]
31
32 extern crate arena;
33
34 #[macro_use]
35 extern crate bitflags;
36 #[macro_use] extern crate log;
37 extern crate either;
38 extern crate graphviz as dot;
39 extern crate polonius_engine;
40 #[macro_use]
41 extern crate rustc;
42 #[macro_use] extern crate rustc_data_structures;
43 extern crate serialize as rustc_serialize;
44 extern crate rustc_errors;
45 #[macro_use]
46 extern crate syntax;
47 extern crate syntax_pos;
48 extern crate rustc_target;
49 extern crate log_settings;
50 extern crate rustc_apfloat;
51 extern crate byteorder;
52 extern crate core;
53 extern crate smallvec;
54
55 // Once we can use edition 2018 in the compiler,
56 // replace this with real try blocks.
57 macro_rules! try_block {
58     ($($inside:tt)*) => (
59         (||{ ::std::ops::Try::from_ok({ $($inside)* }) })()
60     )
61 }
62
63 mod diagnostics;
64
65 mod borrow_check;
66 mod build;
67 mod dataflow;
68 mod hair;
69 mod lints;
70 mod shim;
71 pub mod transform;
72 pub mod util;
73 pub mod interpret;
74 pub mod monomorphize;
75 pub mod const_eval;
76
77 pub use hair::pattern::check_crate as matchck_crate;
78 use rustc::ty::query::Providers;
79
80 pub fn provide(providers: &mut Providers) {
81     borrow_check::provide(providers);
82     shim::provide(providers);
83     transform::provide(providers);
84     monomorphize::partitioning::provide(providers);
85     providers.const_eval = const_eval::const_eval_provider;
86     providers.const_eval_raw = const_eval::const_eval_raw_provider;
87     providers.check_match = hair::pattern::check_match;
88 }
89
90 __build_diagnostic_array! { librustc_mir, DIAGNOSTICS }