From 0f88106940b0d09425a498ce5eef3bcad975a4a2 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Tue, 2 Apr 2019 16:06:43 -0400 Subject: [PATCH] Improve formatting --- src/librustc/session/config.rs | 25 +------------------------ src/librustc_metadata/cstore_impl.rs | 1 - 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index e07ef35c5d51..bf0e4a777777 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -443,10 +443,6 @@ top_level_options!( remap_path_prefix: Vec<(PathBuf, PathBuf)> [UNTRACKED], edition: Edition [TRACKED], - - // The crates to consider private when - // checking leaked private dependency types in public interfaces - //extern_private: ExternPrivates [UNTRACKED], } ); @@ -649,7 +645,6 @@ impl Default for Options { cli_forced_thinlto_off: false, remap_path_prefix: Vec::new(), edition: DEFAULT_EDITION, - //extern_private: ExternPrivates(BTreeMap::new()) } } } @@ -2331,23 +2326,6 @@ pub fn build_session_options_and_crate_config( ) } - /*let mut extern_private: BTreeMap<_, BTreeSet<_>> = BTreeMap::new(); - - for arg in matches.opt_strs("extern-private").into_iter() { - let mut parts = arg.splitn(2, '='); - let name = parts.next().unwrap_or_else(|| - early_error(error_format, "--extern-private value must not be empty")); - let location = parts.next().map(|s| s.to_string()).unwrap_or_else(|| - early_error(error_format, "--extern-private value must include a location")); - - - extern_private - .entry(name.to_owned()) - .or_default() - .insert(location); - - }*/ - // We start out with a Vec<(Option, bool)>>, // and later convert it into a BTreeSet<(Option, bool)> // This allows to modify entries in-place to set their correct @@ -2369,7 +2347,7 @@ pub fn build_session_options_and_crate_config( }; - // Externsl crates start out public, + // Extern crates start out public, // and become private if we later see // an '--extern-private' key. They never // go back to being public once we've seen @@ -2449,7 +2427,6 @@ pub fn build_session_options_and_crate_config( cli_forced_thinlto_off: disable_thinlto, remap_path_prefix, edition, - //extern_private: ExternPrivates(extern_private) }, cfg, ) diff --git a/src/librustc_metadata/cstore_impl.rs b/src/librustc_metadata/cstore_impl.rs index 75671facf944..95fe9a70f750 100644 --- a/src/librustc_metadata/cstore_impl.rs +++ b/src/librustc_metadata/cstore_impl.rs @@ -399,7 +399,6 @@ impl cstore::CStore { r } - pub fn crate_edition_untracked(&self, cnum: CrateNum) -> Edition { self.get_crate_data(cnum).root.edition }