]>
Commit | Line | Data |
---|---|---|
dfeec247 XL |
1 | //! Construction of MIR from HIR. |
2 | //! | |
3 | //! This crate also contains the match exhaustiveness and usefulness checking. | |
5e7ed085 | 4 | #![allow(rustc::potential_query_instability)] |
2b03887a | 5 | #![feature(assert_matches)] |
dfeec247 | 6 | #![feature(box_patterns)] |
1b1a35ee | 7 | #![feature(control_flow_enum)] |
04454e1e | 8 | #![feature(if_let_guard)] |
5e7ed085 | 9 | #![feature(let_chains)] |
17df50a5 | 10 | #![feature(min_specialization)] |
5e7ed085 | 11 | #![feature(once_cell)] |
dfeec247 XL |
12 | #![recursion_limit = "256"] |
13 | ||
14 | #[macro_use] | |
3dfed10e | 15 | extern crate tracing; |
dfeec247 | 16 | #[macro_use] |
ba9703b0 | 17 | extern crate rustc_middle; |
dfeec247 XL |
18 | |
19 | mod build; | |
17df50a5 | 20 | mod check_unsafety; |
dfeec247 | 21 | mod lints; |
6a06907d | 22 | pub mod thir; |
dfeec247 | 23 | |
ba9703b0 | 24 | use rustc_middle::ty::query::Providers; |
dfeec247 | 25 | |
f035d41b | 26 | pub fn provide(providers: &mut Providers) { |
3dfed10e XL |
27 | providers.check_match = thir::pattern::check_match; |
28 | providers.lit_to_const = thir::constant::lit_to_const; | |
923072b8 | 29 | providers.lit_to_mir_constant = build::lit_to_mir_constant; |
dfeec247 | 30 | providers.mir_built = build::mir_built; |
17df50a5 XL |
31 | providers.thir_check_unsafety = check_unsafety::thir_check_unsafety; |
32 | providers.thir_check_unsafety_for_const_arg = check_unsafety::thir_check_unsafety_for_const_arg; | |
33 | providers.thir_body = thir::cx::thir_body; | |
94222f64 | 34 | providers.thir_tree = thir::cx::thir_tree; |
dfeec247 | 35 | } |