Store UNVERSIONED_FILES in a data structure

This allows querying it programatically.
This commit is contained in:
Joshua Nelson
2021-03-05 10:35:22 -05:00
parent 8ccc89bc31
commit 69a879f3d1
3 changed files with 39 additions and 33 deletions

View File

@@ -71,6 +71,24 @@ use rustc_session::config::{make_crate_type_option, ErrorOutputType, RustcOptGro
use rustc_session::getopts;
use rustc_session::{early_error, early_warn};
/// A macro to create a FxHashMap.
///
/// Example:
///
/// ```
/// let letters = map!{"a" => "b", "c" => "d"};
/// ```
///
/// Trailing commas are allowed.
/// Commas between elements are required (even if the expression is a block).
macro_rules! map {
($( $key: expr => $val: expr ),* $(,)*) => {{
let mut map = ::rustc_data_structures::fx::FxHashMap::default();
$( map.insert($key, $val); )*
map
}}
}
#[macro_use]
mod externalfiles;