2016-03-30 13:43:36 +02:00
|
|
|
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
|
|
|
//! constant evaluation on the HIR and code to validate patterns/matches
|
|
|
|
//!
|
|
|
|
//! # Note
|
|
|
|
//!
|
|
|
|
//! This API is completely unstable and subject to change.
|
|
|
|
|
|
|
|
#![crate_name = "rustc_const_eval"]
|
|
|
|
#![unstable(feature = "rustc_private", issue = "27812")]
|
|
|
|
#![crate_type = "dylib"]
|
|
|
|
#![crate_type = "rlib"]
|
|
|
|
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
|
|
|
|
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
|
|
|
|
html_root_url = "https://doc.rust-lang.org/nightly/")]
|
|
|
|
|
2016-08-26 19:23:42 +03:00
|
|
|
#![feature(dotdot_in_tuple_patterns)]
|
2016-03-30 13:43:36 +02:00
|
|
|
#![feature(rustc_private)]
|
|
|
|
#![feature(staged_api)]
|
|
|
|
#![feature(rustc_diagnostic_macros)]
|
|
|
|
#![feature(slice_patterns)]
|
2016-10-06 11:36:36 +13:00
|
|
|
#![cfg_attr(stage0, feature(question_mark))]
|
2016-04-11 10:41:48 +02:00
|
|
|
#![feature(box_patterns)]
|
|
|
|
#![feature(box_syntax)]
|
2016-03-30 13:43:36 +02:00
|
|
|
|
|
|
|
#[macro_use] extern crate syntax;
|
|
|
|
#[macro_use] extern crate log;
|
2016-03-31 20:07:23 +02:00
|
|
|
#[macro_use] extern crate rustc;
|
2016-03-30 13:43:36 +02:00
|
|
|
extern crate rustc_back;
|
|
|
|
extern crate rustc_const_math;
|
2016-09-24 17:45:24 +03:00
|
|
|
extern crate rustc_data_structures;
|
2016-07-20 00:02:56 +03:00
|
|
|
extern crate rustc_errors;
|
2016-03-30 13:43:36 +02:00
|
|
|
extern crate graphviz;
|
2016-06-21 18:08:13 -04:00
|
|
|
extern crate syntax_pos;
|
2016-03-30 13:43:36 +02:00
|
|
|
extern crate serialize as rustc_serialize; // used by deriving
|
|
|
|
|
|
|
|
// NB: This module needs to be declared first so diagnostics are
|
|
|
|
// registered before they are used.
|
|
|
|
pub mod diagnostics;
|
|
|
|
|
|
|
|
mod eval;
|
2016-09-24 18:24:34 +03:00
|
|
|
mod _match;
|
2016-03-30 13:43:36 +02:00
|
|
|
pub mod check_match;
|
2016-09-24 17:45:24 +03:00
|
|
|
pub mod pattern;
|
2016-03-30 13:43:36 +02:00
|
|
|
|
|
|
|
pub use eval::*;
|
|
|
|
|
|
|
|
// Build the diagnostics array at the end so that the metadata includes error use sites.
|
|
|
|
__build_diagnostic_array! { librustc_const_eval, DIAGNOSTICS }
|