]> git.lizzy.rs Git - rust.git/blob - src/librustc_const_eval/lib.rs
Rollup merge of #44562 - eddyb:ugh-rustdoc, r=nikomatsakis
[rust.git] / src / librustc_const_eval / lib.rs
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 #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
18       html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
19       html_root_url = "https://doc.rust-lang.org/nightly/")]
20 #![deny(warnings)]
21
22 #![feature(rustc_diagnostic_macros)]
23 #![feature(slice_patterns)]
24 #![feature(box_patterns)]
25 #![feature(box_syntax)]
26 #![feature(i128_type)]
27
28 #![cfg_attr(stage0, feature(const_fn))]
29 #![cfg_attr(not(stage0), feature(const_min_value))]
30
31 extern crate arena;
32 #[macro_use] extern crate syntax;
33 #[macro_use] extern crate log;
34 #[macro_use] extern crate rustc;
35 extern crate rustc_back;
36 extern crate rustc_const_math;
37 extern crate rustc_data_structures;
38 extern crate rustc_errors;
39 extern crate syntax_pos;
40
41 // NB: This module needs to be declared first so diagnostics are
42 // registered before they are used.
43 mod diagnostics;
44
45 mod eval;
46 mod _match;
47 pub mod check_match;
48 pub mod pattern;
49
50 pub use eval::*;
51
52 // Build the diagnostics array at the end so that the metadata includes error use sites.
53 __build_diagnostic_array! { librustc_const_eval, DIAGNOSTICS }