]> git.proxmox.com Git - rustc.git/blame - src/librustc_const_eval/lib.rs
New upstream version 1.14.0+dfsg1
[rustc.git] / src / librustc_const_eval / lib.rs
CommitLineData
54a0048b
SL
1// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
11//! constant evaluation on the HIR and code to validate patterns/matches
12//!
13//! # Note
14//!
15//! This API is completely unstable and subject to change.
16
17#![crate_name = "rustc_const_eval"]
18#![unstable(feature = "rustc_private", issue = "27812")]
19#![crate_type = "dylib"]
20#![crate_type = "rlib"]
21#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
22 html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
23 html_root_url = "https://doc.rust-lang.org/nightly/")]
24
c30ab7b3 25#![cfg_attr(stage0, feature(dotdot_in_tuple_patterns))]
54a0048b
SL
26#![feature(rustc_private)]
27#![feature(staged_api)]
28#![feature(rustc_diagnostic_macros)]
29#![feature(slice_patterns)]
9e0c209e 30#![cfg_attr(stage0, feature(question_mark))]
a7813a04
XL
31#![feature(box_patterns)]
32#![feature(box_syntax)]
54a0048b 33
c30ab7b3 34extern crate arena;
54a0048b
SL
35#[macro_use] extern crate syntax;
36#[macro_use] extern crate log;
37#[macro_use] extern crate rustc;
38extern crate rustc_back;
39extern crate rustc_const_math;
c30ab7b3 40extern crate rustc_data_structures;
5bcae85e 41extern crate rustc_errors;
54a0048b 42extern crate graphviz;
3157f602 43extern crate syntax_pos;
54a0048b
SL
44extern crate serialize as rustc_serialize; // used by deriving
45
46// NB: This module needs to be declared first so diagnostics are
47// registered before they are used.
48pub mod diagnostics;
49
50mod eval;
c30ab7b3 51mod _match;
54a0048b 52pub mod check_match;
c30ab7b3 53pub mod pattern;
54a0048b
SL
54
55pub use eval::*;
56
57// Build the diagnostics array at the end so that the metadata includes error use sites.
58__build_diagnostic_array! { librustc_const_eval, DIAGNOSTICS }