1#![feature(
14 rustc_private,
15 min_specialization, box_patterns, )]
18#![warn(clippy::pedantic)]
19#![allow(
20 clippy::len_zero,
21 clippy::len_without_is_empty,
22 clippy::must_use_candidate,
23 clippy::return_self_not_must_use,
24 clippy::missing_panics_doc,
25 clippy::missing_errors_doc,
26 clippy::doc_markdown,
27 clippy::single_match_else,
28 clippy::if_not_else,
29 clippy::map_unwrap_or,
30 clippy::match_wildcard_for_single_variants,
31 clippy::items_after_statements,
32 clippy::implicit_hasher,
33 clippy::wildcard_imports
34)]
35
36extern crate either;
37extern crate rustc_abi;
38extern crate rustc_borrowck;
39extern crate rustc_data_structures;
40extern crate rustc_driver;
41extern crate rustc_errors;
42extern crate rustc_graphviz;
43extern crate rustc_hir;
44extern crate rustc_index;
45extern crate rustc_infer;
46extern crate rustc_interface;
47extern crate rustc_lint_defs;
48extern crate rustc_macros;
49extern crate rustc_middle;
50extern crate rustc_mir_dataflow;
51extern crate rustc_mir_transform;
52extern crate rustc_serialize;
53extern crate rustc_session;
54extern crate rustc_span;
55extern crate rustc_target;
56extern crate rustc_trait_selection;
57extern crate rustc_type_ir;
58extern crate smallvec;
59
60pub mod cache;
61pub mod hir;
62pub mod mir;
63pub mod source_map;
64#[cfg(feature = "test")]
65pub mod test_utils;
66pub mod timer;
67
68pub use crate::{
69 hir::ty::TyExt,
70 mir::{
71 adt_def::AdtDefExt, body::BodyExt, mutability::MutabilityExt, operand::OperandExt,
72 place::PlaceExt,
73 },
74 source_map::span::{SpanDataExt, SpanExt},
75};
76
77#[macro_export]
79macro_rules! hashset {
80 (@single $($x:tt)*) => (());
81 (@count $($rest:expr),*) => (<[()]>::len(&[$(hashset!(@single $rest)),*]));
82
83 ($($key:expr,)+) => { hashset!($($key),+) };
84 ($($key:expr),*) => {
85 {
86 let _cap = hashset!(@count $($key),*);
87 let mut _set = ::rustc_data_structures::fx::FxHashSet::default();
88 let _ = _set.try_reserve(_cap);
89 $(
90 let _ = _set.insert($key);
91 )*
92 _set
93 }
94 };
95}