diff --git a/compiler/rustc_builtin_macros/src/standard_library_imports.rs b/compiler/rustc_builtin_macros/src/standard_library_imports.rs index e106f6014a31d..3571517d2b258 100644 --- a/compiler/rustc_builtin_macros/src/standard_library_imports.rs +++ b/compiler/rustc_builtin_macros/src/standard_library_imports.rs @@ -11,7 +11,6 @@ pub fn inject( mut krate: ast::Crate, resolver: &mut dyn ResolverExpand, sess: &Session, - alt_std_name: Option, ) -> ast::Crate { let edition = sess.parse_sess.edition; @@ -53,7 +52,7 @@ pub fn inject( span, ident, vec![cx.attribute(cx.meta_word(span, sym::macro_use))], - ast::ItemKind::ExternCrate(alt_std_name), + ast::ItemKind::ExternCrate(None), ), ); } diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index f5a4e11de16c0..66e1e78b2856c 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -286,8 +286,7 @@ pub fn configure_and_expand( rustc_builtin_macros::register_builtin_macros(resolver); krate = sess.time("crate_injection", || { - let alt_std_name = sess.opts.alt_std_name.as_ref().map(|s| Symbol::intern(s)); - rustc_builtin_macros::standard_library_imports::inject(krate, resolver, sess, alt_std_name) + rustc_builtin_macros::standard_library_imports::inject(krate, resolver, sess) }); util::check_attr_crate_type(sess, &krate.attrs, &mut resolver.lint_buffer()); diff --git a/compiler/rustc_interface/src/util.rs b/compiler/rustc_interface/src/util.rs index 6d9183eda9d32..f74cadfebacba 100644 --- a/compiler/rustc_interface/src/util.rs +++ b/compiler/rustc_interface/src/util.rs @@ -118,7 +118,7 @@ fn get_stack_size() -> Option { /// Like a `thread::Builder::spawn` followed by a `join()`, but avoids the need /// for `'static` bounds. #[cfg(not(parallel_compiler))] -pub fn scoped_thread R + Send, R: Send>(cfg: thread::Builder, f: F) -> R { +fn scoped_thread R + Send, R: Send>(cfg: thread::Builder, f: F) -> R { // SAFETY: join() is called immediately, so any closure captures are still // alive. match unsafe { cfg.spawn_unchecked(f) }.unwrap().join() { @@ -379,7 +379,7 @@ fn sysroot_candidates() -> Vec { } } -pub fn get_codegen_sysroot(maybe_sysroot: &Option, backend_name: &str) -> MakeBackendFn { +fn get_codegen_sysroot(maybe_sysroot: &Option, backend_name: &str) -> MakeBackendFn { // For now we only allow this function to be called once as it'll dlopen a // few things, which seems to work best if we only do that once. In // general this assertion never trips due to the once guard in `get_codegen_backend`, diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 8630ffec241f9..79962d5db8918 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -770,7 +770,6 @@ impl Default for Options { externs: Externs(BTreeMap::new()), extern_dep_specs: ExternDepSpecs(BTreeMap::new()), crate_name: None, - alt_std_name: None, libs: Vec::new(), unstable_features: UnstableFeatures::Disallow, debug_assertions: true, @@ -2382,7 +2381,6 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options { unstable_features: UnstableFeatures::from_environment(crate_name.as_deref()), extern_dep_specs, crate_name, - alt_std_name: None, libs, debug_assertions, actually_rustdoc: false, diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index 550da9e05804f..ae1b638c34467 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -184,10 +184,6 @@ top_level_options!( externs: Externs [UNTRACKED], extern_dep_specs: ExternDepSpecs [UNTRACKED], crate_name: Option [TRACKED], - /// An optional name to use as the crate for std during std injection, - /// written `extern crate name as std`. Defaults to `std`. Used by - /// out-of-tree drivers. - alt_std_name: Option [TRACKED], /// Indicates how the compiler should treat unstable features. unstable_features: UnstableFeatures [TRACKED],