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 09:28:14 +02:00
|
|
|
#![feature(array_windows)]
|
2020-01-05 15:46:44 +00:00
|
|
|
#![feature(box_patterns)]
|
|
|
|
#![feature(box_syntax)]
|
2020-03-10 13:41:33 -07:00
|
|
|
#![feature(const_fn)]
|
|
|
|
#![feature(const_panic)]
|
2020-09-04 00:59:41 -07:00
|
|
|
#![feature(control_flow_enum)]
|
2020-01-05 15:46:44 +00:00
|
|
|
#![feature(crate_visibility_modifier)]
|
|
|
|
#![feature(bool_to_option)]
|
2020-10-23 22:49:26 +01:00
|
|
|
#![feature(once_cell)]
|
2020-04-16 17:38:52 -07:00
|
|
|
#![feature(or_patterns)]
|
2020-01-05 15:46:44 +00:00
|
|
|
#![recursion_limit = "256"]
|
|
|
|
|
|
|
|
#[macro_use]
|
2020-08-13 23:05:01 -07:00
|
|
|
extern crate tracing;
|
2020-01-05 15:46:44 +00:00
|
|
|
#[macro_use]
|
2020-03-29 16:41:09 +02:00
|
|
|
extern crate rustc_middle;
|
2020-01-05 15:46:44 +00:00
|
|
|
|
|
|
|
mod build;
|
|
|
|
mod lints;
|
2020-07-21 09:09:27 +00:00
|
|
|
mod thir;
|
2020-01-05 15:46:44 +00:00
|
|
|
|
2020-03-29 16:41:09 +02:00
|
|
|
use rustc_middle::ty::query::Providers;
|
2020-01-05 15:46:44 +00:00
|
|
|
|
2020-07-05 23:00:14 +03: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;
|
|
|
|
}
|