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)]
|
|
|
|
#![feature(crate_visibility_modifier)]
|
|
|
|
#![feature(bool_to_option)]
|
|
|
|
#![recursion_limit = "256"]
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate log;
|
|
|
|
#[macro_use]
|
|
|
|
extern crate rustc;
|
|
|
|
|
|
|
|
mod build;
|
|
|
|
mod hair;
|
|
|
|
mod lints;
|
|
|
|
|
|
|
|
use rustc::ty::query::Providers;
|
|
|
|
|
|
|
|
pub fn provide(providers: &mut Providers<'_>) {
|
|
|
|
providers.check_match = hair::pattern::check_match;
|
2020-01-11 15:22:36 +13:00
|
|
|
providers.lit_to_const = hair::constant::lit_to_const;
|
2020-01-05 15:46:44 +00:00
|
|
|
providers.mir_built = build::mir_built;
|
|
|
|
}
|