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 #![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)]
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)]
38 #![recursion_limit="256"]
43 extern crate bitflags;
44 #[macro_use] extern crate log;
46 extern crate graphviz as dot;
47 extern crate polonius_engine;
50 #[macro_use] extern crate rustc_data_structures;
51 extern crate serialize as rustc_serialize;
52 extern crate rustc_errors;
55 extern crate syntax_pos;
56 extern crate rustc_target;
57 extern crate log_settings;
58 extern crate rustc_apfloat;
59 extern crate byteorder;
74 pub use hair::pattern::check_crate as matchck_crate;
75 use rustc::ty::query::Providers;
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;
86 __build_diagnostic_array! { librustc_mir, DIAGNOSTICS }