/src/librustc_borrowck/lib.rs

https://gitlab.com/alx741/rust · Rust · 53 lines · 31 code · 9 blank · 13 comment · 0 complexity · 72cd1d8dc304d2e35779514dd3d31567 MD5 · raw file

  1. // Copyright 2012-2014 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. #![crate_name = "rustc_borrowck"]
  11. #![unstable(feature = "rustc_private", issue = "27812")]
  12. #![crate_type = "dylib"]
  13. #![crate_type = "rlib"]
  14. #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
  15. html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
  16. html_root_url = "https://doc.rust-lang.org/nightly/")]
  17. #![cfg_attr(not(stage0), deny(warnings))]
  18. #![allow(non_camel_case_types)]
  19. #![feature(quote)]
  20. #![feature(rustc_diagnostic_macros)]
  21. #![feature(rustc_private)]
  22. #![feature(staged_api)]
  23. #![feature(associated_consts)]
  24. #![feature(nonzero)]
  25. #![feature(question_mark)]
  26. #[macro_use] extern crate log;
  27. #[macro_use] extern crate syntax;
  28. // for "clarity", rename the graphviz crate to dot; graphviz within `borrowck`
  29. // refers to the borrowck-specific graphviz adapter traits.
  30. extern crate graphviz as dot;
  31. #[macro_use]
  32. extern crate rustc;
  33. extern crate rustc_mir;
  34. extern crate core; // for NonZero
  35. pub use borrowck::check_crate;
  36. pub use borrowck::build_borrowck_dataflow_data_for_fn;
  37. pub use borrowck::{AnalysisData, BorrowckCtxt};
  38. // NB: This module needs to be declared first so diagnostics are
  39. // registered before they are used.
  40. pub mod diagnostics;
  41. mod borrowck;
  42. mod bitslice;
  43. pub mod graphviz;
  44. __build_diagnostic_array! { librustc_borrowck, DIAGNOSTICS }