Skip to content

Commit 51ace73

Browse files
committed
Reduce pub exposure.
1 parent b6d0493 commit 51ace73

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

compiler/rustc_session/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2294,7 +2294,7 @@ fn select_debuginfo(matches: &getopts::Matches, cg: &CodegenOptions) -> DebugInf
22942294
if max_g > max_c { DebugInfo::Full } else { cg.debuginfo }
22952295
}
22962296

2297-
pub(crate) fn parse_assert_incr_state(
2297+
fn parse_assert_incr_state(
22982298
handler: &EarlyErrorHandler,
22992299
opt_assertion: &Option<String>,
23002300
) -> Option<IncrementalStateAssertion> {

compiler/rustc_session/src/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ pub struct ParseSess {
214214
pub assume_incomplete_release: bool,
215215
/// Spans passed to `proc_macro::quote_span`. Each span has a numerical
216216
/// identifier represented by its position in the vector.
217-
pub proc_macro_quoted_spans: AppendOnlyVec<Span>,
217+
proc_macro_quoted_spans: AppendOnlyVec<Span>,
218218
/// Used to generate new `AttrId`s. Every `AttrId` is unique.
219219
pub attr_id_generator: AttrIdGenerator,
220220
}

compiler/rustc_session/src/session.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ use crate::parse::{add_feature_diagnostics, ParseSess};
1010
use crate::search_paths::{PathKind, SearchPath};
1111
use crate::{filesearch, lint};
1212

13-
pub use rustc_ast::attr::MarkedAttrs;
14-
pub use rustc_ast::Attribute;
1513
use rustc_data_structures::flock;
1614
use rustc_data_structures::fx::{FxHashMap, FxIndexSet};
1715
use rustc_data_structures::jobserver::{self, Client};
@@ -48,7 +46,7 @@ use std::path::{Path, PathBuf};
4846
use std::str::FromStr;
4947
use std::sync::{atomic::AtomicBool, Arc};
5048

51-
pub struct OptimizationFuel {
49+
struct OptimizationFuel {
5250
/// If `-zfuel=crate=n` is specified, initially set to `n`, otherwise `0`.
5351
remaining: u64,
5452
/// We're rejecting all further optimizations.
@@ -147,7 +145,7 @@ pub struct Session {
147145
pub target: Target,
148146
pub host: Target,
149147
pub opts: config::Options,
150-
pub host_tlib_path: Lrc<SearchPath>,
148+
host_tlib_path: Lrc<SearchPath>,
151149
pub target_tlib_path: Lrc<SearchPath>,
152150
pub parse_sess: ParseSess,
153151
pub sysroot: PathBuf,
@@ -1682,7 +1680,7 @@ fn validate_commandline_args_with_session_available(sess: &Session) {
16821680

16831681
/// Holds data on the current incremental compilation session, if there is one.
16841682
#[derive(Debug)]
1685-
pub enum IncrCompSession {
1683+
enum IncrCompSession {
16861684
/// This is the state the session will be in until the incr. comp. dir is
16871685
/// needed.
16881686
NotInitialized,
@@ -1716,7 +1714,7 @@ impl EarlyErrorHandler {
17161714
/// Swap out the underlying handler once we acquire the user's preference on error emission
17171715
/// format. Any errors prior to that will cause an abort and all stashed diagnostics of the
17181716
/// previous handler will be emitted.
1719-
pub fn abort_if_error_and_set_error_format(&mut self, output: ErrorOutputType) {
1717+
pub(crate) fn abort_if_error_and_set_error_format(&mut self, output: ErrorOutputType) {
17201718
self.handler.abort_if_errors();
17211719

17221720
let emitter = mk_emitter(output);
@@ -1725,13 +1723,13 @@ impl EarlyErrorHandler {
17251723

17261724
#[allow(rustc::untranslatable_diagnostic)]
17271725
#[allow(rustc::diagnostic_outside_of_impl)]
1728-
pub fn early_note(&self, msg: impl Into<DiagnosticMessage>) {
1726+
pub(crate) fn early_note(&self, msg: impl Into<DiagnosticMessage>) {
17291727
self.handler.struct_note_without_error(msg).emit()
17301728
}
17311729

17321730
#[allow(rustc::untranslatable_diagnostic)]
17331731
#[allow(rustc::diagnostic_outside_of_impl)]
1734-
pub fn early_help(&self, msg: impl Into<DiagnosticMessage>) {
1732+
pub(crate) fn early_help(&self, msg: impl Into<DiagnosticMessage>) {
17351733
self.handler.struct_help(msg).emit()
17361734
}
17371735

0 commit comments

Comments
 (0)