Tidy fixes

This commit is contained in:
Aaron Hill 2019-01-29 16:16:57 -05:00
parent fe15f7177f
commit 45486cce2c
No known key found for this signature in database
GPG Key ID: B4087E510E98B164
2 changed files with 5 additions and 4 deletions

View File

@ -1917,7 +1917,7 @@ pub fn build_session_options_and_crate_config(
let crate_types = parse_crate_types_from_list(unparsed_crate_types)
.unwrap_or_else(|e| early_error(error_format, &e[..]));
let (lint_opts, describe_lints, lint_cap) = get_cmd_lint_options(matches, error_format);
let mut debugging_opts = build_debugging_options(matches, error_format);

View File

@ -1762,9 +1762,10 @@ fn privacy_access_levels<'tcx>(
queries::check_mod_privacy::ensure(tcx, tcx.hir().local_def_id(module));
}
let public_crates: Option<FxHashSet<CrateNum>> = tcx.sess.opts.extern_public.as_ref().map(|s| s.iter().flat_map(|c| {
tcx.crates().iter().find(|&&krate| &tcx.crate_name(krate) == c).cloned()
}).collect());
let public_crates: Option<FxHashSet<CrateNum>> = tcx.sess.opts.extern_public.as_ref()
.map(|s| s.iter().flat_map(|c| {
tcx.crates().iter().find(|&&krate| &tcx.crate_name(krate) == c).cloned()
}).collect());
// Build up a set of all exported items in the AST. This is a set of all