Cleanup unecessary code

This commit is contained in:
Aaron Hill 2019-01-31 14:36:26 -05:00
parent 541d315313
commit 369faaeaff
No known key found for this signature in database
GPG Key ID: B4087E510E98B164
2 changed files with 0 additions and 15 deletions

View File

@ -1653,13 +1653,6 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
for the compiler to emit",
"[bin|lib|rlib|dylib|cdylib|staticlib|proc-macro]",
),
opt::multi_s(
"",
"extern-public",
"Comma separated list of crates to consider 'public'
for linting purposes",
"CRATES",
),
opt::opt_s(
"",
"crate-name",
@ -1942,9 +1935,6 @@ pub fn build_session_options_and_crate_config(
);
}
let mut output_types = BTreeMap::new();
if !debugging_opts.parse_only {
for list in matches.opt_strs("emit") {

View File

@ -1538,14 +1538,9 @@ impl<'a, 'tcx: 'a> SearchInterfaceForPrivateItemsVisitor<'a, 'tcx> {
/// 1. It's contained within a public type
/// 2. It comes from a private crate
fn leaks_private_dep(&self, item_id: DefId) -> bool {
// Don't do any leak checking if no private crates were specified
if self.private_crates.is_empty() {
return false
}
let ret = self.required_visibility == ty::Visibility::Public &&
self.private_crates.contains(&item_id.krate);
debug!("leaks_private_dep(item_id={:?})={}", item_id, ret);
return ret;
}