2020-01-05 15:46:44 +00:00
|
|
|
//! Construction of MIR from HIR.
|
|
|
|
//!
|
|
|
|
//! This crate also contains the match exhaustiveness and usefulness checking.
|
2020-09-17 07:28:14 +00:00
|
|
|
#![feature(array_windows)]
|
2020-01-05 15:46:44 +00:00
|
|
|
#![feature(box_patterns)]
|
|
|
|
#![feature(box_syntax)]
|
2020-03-10 20:41:33 +00:00
|
|
|
#![feature(const_panic)]
|
2020-09-04 07:59:41 +00:00
|
|
|
#![feature(control_flow_enum)]
|
2020-01-05 15:46:44 +00:00
|
|
|
#![feature(crate_visibility_modifier)]
|
|
|
|
#![feature(bool_to_option)]
|
2021-03-08 23:32:41 +00:00
|
|
|
#![feature(iter_zip)]
|
2020-10-23 21:49:26 +00:00
|
|
|
#![feature(once_cell)]
|
2020-11-21 21:12:05 +00:00
|
|
|
#![cfg_attr(bootstrap, feature(or_patterns))]
|
2020-01-05 15:46:44 +00:00
|
|
|
#![recursion_limit = "256"]
|
|
|
|
|
|
|
|
#[macro_use]
|
2020-08-14 06:05:01 +00:00
|
|
|
extern crate tracing;
|
2020-01-05 15:46:44 +00:00
|
|
|
#[macro_use]
|
2020-03-29 14:41:09 +00:00
|
|
|
extern crate rustc_middle;
|
2020-01-05 15:46:44 +00:00
|
|
|
|
|
|
|
mod build;
|
|
|
|
mod lints;
|
2021-03-07 14:09:00 +00:00
|
|
|
pub mod thir;
|
2020-01-05 15:46:44 +00:00
|
|
|
|
2020-03-29 14:41:09 +00:00
|
|
|
use rustc_middle::ty::query::Providers;
|
2020-01-05 15:46:44 +00:00
|
|
|
|
2020-07-05 20:00:14 +00:00
|
|
|
pub fn provide(providers: &mut Providers) {
|
2020-07-21 09:09:27 +00:00
|
|
|
providers.check_match = thir::pattern::check_match;
|
|
|
|
providers.lit_to_const = thir::constant::lit_to_const;
|
2020-01-05 15:46:44 +00:00
|
|
|
providers.mir_built = build::mir_built;
|
|
|
|
}
|