rustc_mir_build/lib.rs
1//! Construction of MIR from HIR.
2
3// tidy-alphabetical-start
4#![feature(box_patterns)]
5#![feature(try_blocks)]
6// tidy-alphabetical-end
7
8// The `builder` module used to be named `build`, but that was causing GitHub's
9// "Go to file" feature to silently ignore all files in the module, probably
10// because it assumes that "build" is a build-output directory. See #134365.
11mod builder;
12mod check_tail_calls;
13mod check_unsafety;
14mod errors;
15pub mod thir;
16
17use rustc_middle::util::Providers;
18
19pub fn provide(providers: &mut Providers) {
20 providers.queries.check_match = thir::pattern::check_match;
21 providers.queries.lit_to_const = thir::constant::lit_to_const;
22 providers.queries.closure_saved_names_of_captured_variables =
23 builder::closure_saved_names_of_captured_variables;
24 providers.queries.check_unsafety = check_unsafety::check_unsafety;
25 providers.queries.check_tail_calls = check_tail_calls::check_tail_calls;
26 providers.queries.thir_body = thir::cx::thir_body;
27 providers.hooks.build_mir_inner_impl = builder::build_mir_inner_impl;
28}