Skip to content

Commit 2af0f0d

Browse files
committed
Hide more stuff from rustc_trans
1 parent af0f173 commit 2af0f0d

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

src/librustc_trans/lib.rs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ use rustc_trans_utils::trans_crate::TransCrate;
8989

9090
mod diagnostics;
9191

92-
pub(crate) mod back {
92+
mod back {
93+
pub use rustc_trans_utils::symbol_names;
9394
mod archive;
9495
pub mod bytecode;
9596
mod command;
96-
pub(crate) mod linker;
97+
pub mod linker;
9798
pub mod link;
9899
mod lto;
99-
pub(crate) mod symbol_export;
100-
pub(crate) use rustc_trans_utils::symbol_names;
100+
pub mod symbol_export;
101101
pub mod write;
102102
mod rpath;
103103
}
@@ -258,8 +258,8 @@ pub struct ModuleTranslation {
258258
/// as the crate name and disambiguator.
259259
name: String,
260260
llmod_id: String,
261-
pub source: ModuleSource,
262-
pub kind: ModuleKind,
261+
source: ModuleSource,
262+
kind: ModuleKind,
263263
}
264264

265265
#[derive(Copy, Clone, Debug, PartialEq)]
@@ -270,14 +270,14 @@ pub enum ModuleKind {
270270
}
271271

272272
impl ModuleTranslation {
273-
pub fn llvm(&self) -> Option<&ModuleLlvm> {
273+
fn llvm(&self) -> Option<&ModuleLlvm> {
274274
match self.source {
275275
ModuleSource::Translated(ref llvm) => Some(llvm),
276276
ModuleSource::Preexisting(_) => None,
277277
}
278278
}
279279

280-
pub fn into_compiled_module(self,
280+
fn into_compiled_module(self,
281281
emit_obj: bool,
282282
emit_bc: bool,
283283
emit_bc_compressed: bool,
@@ -317,16 +317,16 @@ impl ModuleTranslation {
317317

318318
#[derive(Debug)]
319319
pub struct CompiledModule {
320-
pub name: String,
321-
pub llmod_id: String,
322-
pub kind: ModuleKind,
323-
pub pre_existing: bool,
324-
pub object: Option<PathBuf>,
325-
pub bytecode: Option<PathBuf>,
326-
pub bytecode_compressed: Option<PathBuf>,
320+
name: String,
321+
llmod_id: String,
322+
kind: ModuleKind,
323+
pre_existing: bool,
324+
object: Option<PathBuf>,
325+
bytecode: Option<PathBuf>,
326+
bytecode_compressed: Option<PathBuf>,
327327
}
328328

329-
pub enum ModuleSource {
329+
enum ModuleSource {
330330
/// Copy the `.o` files or whatever from the incr. comp. directory.
331331
Preexisting(WorkProduct),
332332

@@ -337,7 +337,7 @@ pub enum ModuleSource {
337337
#[derive(Debug)]
338338
pub struct ModuleLlvm {
339339
llcx: llvm::ContextRef,
340-
pub llmod: llvm::ModuleRef,
340+
llmod: llvm::ModuleRef,
341341
tm: llvm::TargetMachineRef,
342342
}
343343

@@ -355,12 +355,12 @@ impl Drop for ModuleLlvm {
355355
}
356356

357357
pub struct CrateTranslation {
358-
pub crate_name: Symbol,
359-
pub modules: Vec<CompiledModule>,
358+
crate_name: Symbol,
359+
modules: Vec<CompiledModule>,
360360
allocator_module: Option<CompiledModule>,
361361
metadata_module: CompiledModule,
362-
pub link: rustc::middle::cstore::LinkMeta,
363-
pub metadata: rustc::middle::cstore::EncodedMetadata,
362+
link: rustc::middle::cstore::LinkMeta,
363+
metadata: rustc::middle::cstore::EncodedMetadata,
364364
windows_subsystem: Option<String>,
365365
linker_info: back::linker::LinkerInfo,
366366
crate_info: CrateInfo,

0 commit comments

Comments
 (0)