/src/librustc_const_eval/lib.rs

https://gitlab.com/alx741/rust · Rust · 54 lines · 27 code · 10 blank · 17 comment · 0 complexity · 66771ec45cf2a396369b2e654692bd4a MD5 · raw file

  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. //! constant evaluation on the HIR and code to validate patterns/matches
  11. //!
  12. //! # Note
  13. //!
  14. //! This API is completely unstable and subject to change.
  15. #![crate_name = "rustc_const_eval"]
  16. #![unstable(feature = "rustc_private", issue = "27812")]
  17. #![crate_type = "dylib"]
  18. #![crate_type = "rlib"]
  19. #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
  20. html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
  21. html_root_url = "https://doc.rust-lang.org/nightly/")]
  22. #![feature(rustc_private)]
  23. #![feature(staged_api)]
  24. #![feature(rustc_diagnostic_macros)]
  25. #![feature(slice_patterns)]
  26. #![feature(iter_arith)]
  27. #![feature(question_mark)]
  28. #![feature(box_patterns)]
  29. #![feature(box_syntax)]
  30. #[macro_use] extern crate syntax;
  31. #[macro_use] extern crate log;
  32. #[macro_use] extern crate rustc;
  33. extern crate rustc_back;
  34. extern crate rustc_const_math;
  35. extern crate graphviz;
  36. extern crate serialize as rustc_serialize; // used by deriving
  37. // NB: This module needs to be declared first so diagnostics are
  38. // registered before they are used.
  39. pub mod diagnostics;
  40. mod eval;
  41. pub mod check_match;
  42. pub use eval::*;
  43. // Build the diagnostics array at the end so that the metadata includes error use sites.
  44. __build_diagnostic_array! { librustc_const_eval, DIAGNOSTICS }