mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Cleanup unecessary code
This commit is contained in:
parent
541d315313
commit
369faaeaff
@ -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") {
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user