@@ -271,7 +271,7 @@ pub fn anon_src() -> String {
271
271
"<anon>" . to_string ( )
272
272
}
273
273
274
- pub ( crate ) fn source_name ( input : & Input ) -> String {
274
+ pub fn source_name ( input : & Input ) -> String {
275
275
match * input {
276
276
// FIXME (#9639): This needs to handle non-utf8 paths
277
277
Input :: File ( ref ifile) => ifile. to_str ( ) . unwrap ( ) . to_string ( ) ,
@@ -295,11 +295,11 @@ pub(crate) fn source_name(input: &Input) -> String {
295
295
/// Expect more entry points to be added in the future.
296
296
pub struct CompileController < ' a > {
297
297
pub after_parse : PhaseController < ' a > ,
298
- pub ( crate ) after_expand : PhaseController < ' a > ,
298
+ pub after_expand : PhaseController < ' a > ,
299
299
pub after_hir_lowering : PhaseController < ' a > ,
300
300
pub after_analysis : PhaseController < ' a > ,
301
301
pub after_llvm : PhaseController < ' a > ,
302
- pub ( crate ) compilation_done : PhaseController < ' a > ,
302
+ pub compilation_done : PhaseController < ' a > ,
303
303
304
304
pub make_glob_map : MakeGlobMap ,
305
305
}
@@ -327,7 +327,7 @@ pub struct PhaseController<'a> {
327
327
}
328
328
329
329
impl < ' a > PhaseController < ' a > {
330
- pub ( crate ) fn basic ( ) -> PhaseController < ' a > {
330
+ pub fn basic ( ) -> PhaseController < ' a > {
331
331
PhaseController {
332
332
stop : Compilation :: Continue ,
333
333
run_callback_on_error : false ,
@@ -340,19 +340,19 @@ impl<'a> PhaseController<'a> {
340
340
/// during compilation the callback is made. See the various constructor methods
341
341
/// (`state_*`) in the impl to see which data is provided for any given entry point.
342
342
pub struct CompileState < ' a , ' tcx : ' a > {
343
- pub ( crate ) input : & ' a Input ,
343
+ pub input : & ' a Input ,
344
344
pub session : & ' tcx Session ,
345
345
pub krate : Option < ast:: Crate > ,
346
- pub ( crate ) registry : Option < Registry < ' a > > ,
346
+ pub registry : Option < Registry < ' a > > ,
347
347
pub crate_name : Option < & ' a str > ,
348
- pub ( crate ) out_dir : Option < & ' a Path > ,
349
- pub ( crate ) out_file : Option < & ' a Path > ,
350
- pub ( crate ) arena : Option < & ' tcx DroplessArena > ,
351
- pub ( crate ) arenas : Option < & ' tcx GlobalArenas < ' tcx > > ,
348
+ pub out_dir : Option < & ' a Path > ,
349
+ pub out_file : Option < & ' a Path > ,
350
+ pub arena : Option < & ' tcx DroplessArena > ,
351
+ pub arenas : Option < & ' tcx GlobalArenas < ' tcx > > ,
352
352
pub expanded_crate : Option < & ' a ast:: Crate > ,
353
353
pub hir_crate : Option < & ' a hir:: Crate > ,
354
- pub ( crate ) hir_map : Option < & ' a hir_map:: Map < ' tcx > > ,
355
- pub ( crate ) resolutions : Option < & ' a Resolutions > ,
354
+ pub hir_map : Option < & ' a hir_map:: Map < ' tcx > > ,
355
+ pub resolutions : Option < & ' a Resolutions > ,
356
356
pub analysis : Option < & ' a ty:: CrateAnalysis > ,
357
357
pub tcx : Option < TyCtxt < ' a , ' tcx , ' tcx > > ,
358
358
pub trans : Option < & ' a trans:: CrateTranslation > ,
@@ -534,7 +534,7 @@ fn count_nodes(krate: &ast::Crate) -> usize {
534
534
// modified
535
535
536
536
pub struct ExpansionResult {
537
- pub ( crate ) expanded_crate : ast:: Crate ,
537
+ pub expanded_crate : ast:: Crate ,
538
538
pub defs : hir_map:: Definitions ,
539
539
pub analysis : ty:: CrateAnalysis ,
540
540
pub resolutions : Resolutions ,
@@ -1041,11 +1041,11 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: &'tcx Session,
1041
1041
1042
1042
/// Run the translation phase to LLVM, after which the AST and analysis can
1043
1043
/// be discarded.
1044
- pub ( crate ) fn phase_4_translate_to_llvm < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
1045
- analysis : ty:: CrateAnalysis ,
1046
- incremental_hashes_map : & IncrementalHashesMap ,
1047
- output_filenames : & OutputFilenames )
1048
- -> trans:: CrateTranslation {
1044
+ pub fn phase_4_translate_to_llvm < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
1045
+ analysis : ty:: CrateAnalysis ,
1046
+ incremental_hashes_map : & IncrementalHashesMap ,
1047
+ output_filenames : & OutputFilenames )
1048
+ -> trans:: CrateTranslation {
1049
1049
let time_passes = tcx. sess . time_passes ( ) ;
1050
1050
1051
1051
time ( time_passes,
@@ -1072,9 +1072,9 @@ pub(crate) fn phase_4_translate_to_llvm<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
1072
1072
1073
1073
/// Run LLVM itself, producing a bitcode file, assembly file or object file
1074
1074
/// as a side effect.
1075
- pub ( crate ) fn phase_5_run_llvm_passes ( sess : & Session ,
1076
- trans : & trans:: CrateTranslation ,
1077
- outputs : & OutputFilenames ) -> CompileResult {
1075
+ pub fn phase_5_run_llvm_passes ( sess : & Session ,
1076
+ trans : & trans:: CrateTranslation ,
1077
+ outputs : & OutputFilenames ) -> CompileResult {
1078
1078
if sess. opts . cg . no_integrated_as ||
1079
1079
( sess. target . target . options . no_integrated_as &&
1080
1080
( outputs. outputs . contains_key ( & OutputType :: Object ) ||
@@ -1116,9 +1116,9 @@ pub(crate) fn phase_5_run_llvm_passes(sess: &Session,
1116
1116
1117
1117
/// Run the linker on any artifacts that resulted from the LLVM run.
1118
1118
/// This should produce either a finished executable or library.
1119
- pub ( crate ) fn phase_6_link_output ( sess : & Session ,
1120
- trans : & trans:: CrateTranslation ,
1121
- outputs : & OutputFilenames ) {
1119
+ pub fn phase_6_link_output ( sess : & Session ,
1120
+ trans : & trans:: CrateTranslation ,
1121
+ outputs : & OutputFilenames ) {
1122
1122
time ( sess. time_passes ( ) ,
1123
1123
"linking" ,
1124
1124
|| link:: link_binary ( sess, trans, outputs, & trans. crate_name . as_str ( ) ) ) ;
@@ -1188,8 +1188,8 @@ fn write_out_deps(sess: &Session, outputs: &OutputFilenames, crate_name: &str) {
1188
1188
}
1189
1189
}
1190
1190
1191
- pub ( crate ) fn collect_crate_types ( session : & Session , attrs : & [ ast:: Attribute ] )
1192
- -> Vec < config:: CrateType > {
1191
+ pub fn collect_crate_types ( session : & Session , attrs : & [ ast:: Attribute ] )
1192
+ -> Vec < config:: CrateType > {
1193
1193
// Unconditionally collect crate types from attributes to make them used
1194
1194
let attr_types: Vec < config:: CrateType > =
1195
1195
attrs. iter ( )
@@ -1269,7 +1269,7 @@ pub(crate) fn collect_crate_types(session: &Session, attrs: &[ast::Attribute])
1269
1269
. collect ( )
1270
1270
}
1271
1271
1272
- pub ( crate ) fn compute_crate_disambiguator ( session : & Session ) -> String {
1272
+ pub fn compute_crate_disambiguator ( session : & Session ) -> String {
1273
1273
use std:: hash:: Hasher ;
1274
1274
1275
1275
// The crate_disambiguator is a 128 bit hash. The disambiguator is fed
@@ -1304,12 +1304,12 @@ pub(crate) fn compute_crate_disambiguator(session: &Session) -> String {
1304
1304
format ! ( "{}{}" , hasher. finish( ) . to_hex( ) , if is_exe { "-exe" } else { "" } )
1305
1305
}
1306
1306
1307
- pub ( crate ) fn build_output_filenames ( input : & Input ,
1308
- odir : & Option < PathBuf > ,
1309
- ofile : & Option < PathBuf > ,
1310
- attrs : & [ ast:: Attribute ] ,
1311
- sess : & Session )
1312
- -> OutputFilenames {
1307
+ pub fn build_output_filenames ( input : & Input ,
1308
+ odir : & Option < PathBuf > ,
1309
+ ofile : & Option < PathBuf > ,
1310
+ attrs : & [ ast:: Attribute ] ,
1311
+ sess : & Session )
1312
+ -> OutputFilenames {
1313
1313
match * ofile {
1314
1314
None => {
1315
1315
// "-" as input file will cause the parser to read from stdin so we
0 commit comments