]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_mir_build/src/lib.rs
Rollup merge of #106441 - mllken:abstract-socket-noref, r=joshtriplett
[rust.git] / compiler / rustc_mir_build / src / lib.rs
1 //! Construction of MIR from HIR.
2 //!
3 //! This crate also contains the match exhaustiveness and usefulness checking.
4 #![allow(rustc::potential_query_instability)]
5 #![feature(assert_matches)]
6 #![feature(associated_type_bounds)]
7 #![feature(box_patterns)]
8 #![feature(control_flow_enum)]
9 #![feature(if_let_guard)]
10 #![feature(let_chains)]
11 #![feature(min_specialization)]
12 #![feature(once_cell)]
13 #![feature(try_blocks)]
14 #![recursion_limit = "256"]
15
16 #[macro_use]
17 extern crate tracing;
18 #[macro_use]
19 extern crate rustc_middle;
20
21 mod build;
22 mod check_unsafety;
23 mod errors;
24 mod lints;
25 pub mod thir;
26
27 use rustc_middle::ty::query::Providers;
28
29 pub fn provide(providers: &mut Providers) {
30     providers.check_match = thir::pattern::check_match;
31     providers.lit_to_const = thir::constant::lit_to_const;
32     providers.lit_to_mir_constant = build::lit_to_mir_constant;
33     providers.mir_built = build::mir_built;
34     providers.thir_check_unsafety = check_unsafety::thir_check_unsafety;
35     providers.thir_check_unsafety_for_const_arg = check_unsafety::thir_check_unsafety_for_const_arg;
36     providers.thir_body = thir::cx::thir_body;
37     providers.thir_tree = thir::cx::thir_tree;
38 }