2020-01-05 15:46:44 +00:00
|
|
|
//! Construction of MIR from HIR.
|
|
|
|
//!
|
|
|
|
//! This crate also contains the match exhaustiveness and usefulness checking.
|
|
|
|
|
|
|
|
#![feature(box_patterns)]
|
|
|
|
#![feature(box_syntax)]
|
2020-03-10 20:41:33 +00:00
|
|
|
#![feature(const_fn)]
|
|
|
|
#![feature(const_panic)]
|
2020-01-05 15:46:44 +00:00
|
|
|
#![feature(crate_visibility_modifier)]
|
|
|
|
#![feature(bool_to_option)]
|
2020-04-17 00:38:52 +00:00
|
|
|
#![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;
|
2020-07-21 09:09:27 +00:00
|
|
|
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;
|
|
|
|
}
|