]> git.lizzy.rs Git - rust.git/blob - src/librustc_mir/lib.rs
Account for --remap-path-prefix in save-analysis
[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(from_ref)]
22 #![feature(box_patterns)]
23 #![feature(box_syntax)]
24 #![feature(catch_expr)]
25 #![feature(crate_visibility_modifier)]
26 #![feature(const_fn)]
27 #![feature(core_intrinsics)]
28 #![feature(decl_macro)]
29 #![feature(fs_read_write)]
30 #![feature(in_band_lifetimes)]
31 #![feature(macro_vis_matcher)]
32 #![feature(exhaustive_patterns)]
33 #![feature(range_contains)]
34 #![feature(rustc_diagnostic_macros)]
35 #![feature(crate_visibility_modifier)]
36 #![feature(never_type)]
37 #![feature(specialization)]
38 #![feature(try_trait)]
39 #![feature(unicode_internals)]
40 #![feature(step_trait)]
41
42 #![recursion_limit="256"]
43
44 extern crate arena;
45
46 #[macro_use]
47 extern crate bitflags;
48 #[macro_use] extern crate log;
49 extern crate either;
50 extern crate graphviz as dot;
51 extern crate polonius_engine;
52 #[macro_use]
53 extern crate rustc;
54 #[macro_use] extern crate rustc_data_structures;
55 extern crate serialize as rustc_serialize;
56 extern crate rustc_errors;
57 #[macro_use]
58 extern crate syntax;
59 extern crate syntax_pos;
60 extern crate rustc_target;
61 extern crate log_settings;
62 extern crate rustc_apfloat;
63 extern crate byteorder;
64 extern crate core;
65
66 mod diagnostics;
67
68 mod borrow_check;
69 mod build;
70 mod dataflow;
71 mod hair;
72 mod shim;
73 pub mod transform;
74 pub mod util;
75 pub mod interpret;
76 pub mod monomorphize;
77
78 pub use hair::pattern::check_crate as matchck_crate;
79 use rustc::ty::query::Providers;
80
81 pub fn provide(providers: &mut Providers) {
82     borrow_check::provide(providers);
83     shim::provide(providers);
84     transform::provide(providers);
85     providers.const_eval = interpret::const_eval_provider;
86     providers.const_value_to_allocation = interpret::const_value_to_allocation_provider;
87     providers.check_match = hair::pattern::check_match;
88 }
89
90 __build_diagnostic_array! { librustc_mir, DIAGNOSTICS }