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.
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.
13 Rust MIR: a lowered representation of Rust. Also: an experiment!
17 #![cfg_attr(not(stage0), feature(nll))]
18 #![feature(infer_outlives_requirements)]
19 #![feature(in_band_lifetimes)]
20 #![feature(slice_patterns)]
21 #![feature(slice_sort_by_cached_key)]
22 #![feature(box_patterns)]
23 #![feature(box_syntax)]
24 #![feature(catch_expr)]
25 #![feature(crate_visibility_modifier)]
27 #![feature(core_intrinsics)]
28 #![feature(decl_macro)]
29 #![cfg_attr(stage0, feature(macro_vis_matcher))]
30 #![feature(exhaustive_patterns)]
31 #![feature(range_contains)]
32 #![feature(rustc_diagnostic_macros)]
33 #![feature(never_type)]
34 #![feature(specialization)]
35 #![feature(try_trait)]
36 #![feature(unicode_internals)]
37 #![feature(step_trait)]
38 #![feature(slice_concat_ext)]
39 #![feature(if_while_or_patterns)]
42 #![recursion_limit="256"]
47 extern crate bitflags;
48 #[macro_use] extern crate log;
50 extern crate graphviz as dot;
51 extern crate polonius_engine;
54 #[macro_use] extern crate rustc_data_structures;
55 extern crate serialize as rustc_serialize;
56 extern crate rustc_errors;
59 extern crate syntax_pos;
60 extern crate rustc_target;
61 extern crate log_settings;
62 extern crate rustc_apfloat;
63 extern crate byteorder;
65 extern crate smallvec;
79 pub use hair::pattern::check_crate as matchck_crate;
80 use rustc::ty::query::Providers;
82 pub fn provide(providers: &mut Providers) {
83 borrow_check::provide(providers);
84 shim::provide(providers);
85 transform::provide(providers);
86 providers.const_eval = interpret::const_eval_provider;
87 providers.const_to_allocation = interpret::const_to_allocation_provider;
88 providers.check_match = hair::pattern::check_match;
91 __build_diagnostic_array! { librustc_mir, DIAGNOSTICS }