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