]> git.lizzy.rs Git - rust.git/blob - src/librustc_mir/lib.rs
Rollup merge of #53110 - Xanewok:save-analysis-remap-path, r=nrc
[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 #![feature(infer_outlives_requirements)]
18 #![feature(in_band_lifetimes)]
19 #![feature(slice_patterns)]
20 #![feature(slice_sort_by_cached_key)]
21 #![feature(box_patterns)]
22 #![feature(box_syntax)]
23 #![feature(catch_expr)]
24 #![feature(crate_visibility_modifier)]
25 #![feature(const_fn)]
26 #![feature(core_intrinsics)]
27 #![feature(decl_macro)]
28 #![feature(macro_vis_matcher)]
29 #![feature(exhaustive_patterns)]
30 #![feature(range_contains)]
31 #![feature(rustc_diagnostic_macros)]
32 #![feature(never_type)]
33 #![feature(specialization)]
34 #![feature(try_trait)]
35 #![feature(unicode_internals)]
36 #![feature(step_trait)]
37
38 #![recursion_limit="256"]
39
40 extern crate arena;
41
42 #[macro_use]
43 extern crate bitflags;
44 #[macro_use] extern crate log;
45 extern crate either;
46 extern crate graphviz as dot;
47 extern crate polonius_engine;
48 #[macro_use]
49 extern crate rustc;
50 #[macro_use] extern crate rustc_data_structures;
51 extern crate serialize as rustc_serialize;
52 extern crate rustc_errors;
53 #[macro_use]
54 extern crate syntax;
55 extern crate syntax_pos;
56 extern crate rustc_target;
57 extern crate log_settings;
58 extern crate rustc_apfloat;
59 extern crate byteorder;
60 extern crate core;
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 pub use hair::pattern::check_crate as matchck_crate;
75 use rustc::ty::query::Providers;
76
77 pub fn provide(providers: &mut Providers) {
78     borrow_check::provide(providers);
79     shim::provide(providers);
80     transform::provide(providers);
81     providers.const_eval = interpret::const_eval_provider;
82     providers.const_value_to_allocation = interpret::const_value_to_allocation_provider;
83     providers.check_match = hair::pattern::check_match;
84 }
85
86 __build_diagnostic_array! { librustc_mir, DIAGNOSTICS }