Skip to content

Commit 82fd711

Browse files
committed
libcore: De-export core.rc and core.rs
1 parent 3ccf6f5 commit 82fd711

File tree

2 files changed

+113
-137
lines changed

2 files changed

+113
-137
lines changed

src/libcore/core.rc

Lines changed: 79 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ Implicitly, all crates behave as if they included the following prologue:
3636
// Don't link to core. We are core.
3737
#[no_core];
3838

39-
#[legacy_exports];
39+
//#[legacy_exports];
4040

4141
#[warn(deprecated_mode)];
4242
#[warn(deprecated_pattern)];
4343

4444
#[warn(vecs_implicitly_copyable)];
4545
#[deny(non_camel_case_types)];
4646

47+
/*
4748
export int, i8, i16, i32, i64;
4849
export uint, u8, u16, u32, u64;
4950
export float, f32, f64;
@@ -81,182 +82,182 @@ export option_iter;
8182
// This creates some APIs that I do not want to commit to, but it must be
8283
// exported from core in order for uv to remain in std (see #2648).
8384
export private;
84-
85+
*/
8586

8687
// Built-in-type support modules
8788

8889
/// Operations and constants for `int`
8990
#[path = "int-template"]
90-
mod int {
91+
pub mod int {
9192
pub use inst::{ pow };
9293
#[path = "int.rs"]
93-
mod inst;
94+
pub mod inst;
9495
}
9596

9697
/// Operations and constants for `i8`
9798
#[path = "int-template"]
98-
mod i8 {
99+
pub mod i8 {
99100
#[path = "i8.rs"]
100-
mod inst;
101+
pub mod inst;
101102
}
102103

103104
/// Operations and constants for `i16`
104105
#[path = "int-template"]
105-
mod i16 {
106+
pub mod i16 {
106107
#[path = "i16.rs"]
107-
mod inst;
108+
pub mod inst;
108109
}
109110

110111
/// Operations and constants for `i32`
111112
#[path = "int-template"]
112-
mod i32 {
113+
pub mod i32 {
113114
#[path = "i32.rs"]
114-
mod inst;
115+
pub mod inst;
115116
}
116117

117118
/// Operations and constants for `i64`
118119
#[path = "int-template"]
119-
mod i64 {
120+
pub mod i64 {
120121
#[path = "i64.rs"]
121-
mod inst;
122+
pub mod inst;
122123
}
123124

124125
/// Operations and constants for `uint`
125126
#[path = "uint-template"]
126-
mod uint {
127+
pub mod uint {
127128
pub use inst::{
128129
div_ceil, div_round, div_floor, iterate,
129130
next_power_of_two
130131
};
131132
#[path = "uint.rs"]
132-
mod inst;
133+
pub mod inst;
133134
}
134135

135136
/// Operations and constants for `u8`
136137
#[path = "uint-template"]
137-
mod u8 {
138+
pub mod u8 {
138139
pub use inst::is_ascii;
139140
#[path = "u8.rs"]
140-
mod inst;
141+
pub mod inst;
141142
}
142143

143144
/// Operations and constants for `u16`
144145
#[path = "uint-template"]
145-
mod u16 {
146+
pub mod u16 {
146147
#[path = "u16.rs"]
147-
mod inst;
148+
pub mod inst;
148149
}
149150

150151
/// Operations and constants for `u32`
151152
#[path = "uint-template"]
152-
mod u32 {
153+
pub mod u32 {
153154
#[path = "u32.rs"]
154-
mod inst;
155+
pub mod inst;
155156
}
156157

157158
/// Operations and constants for `u64`
158159
#[path = "uint-template"]
159-
mod u64 {
160+
pub mod u64 {
160161
#[path = "u64.rs"]
161-
mod inst;
162+
pub mod inst;
162163
}
163164

164165

165-
mod box;
166-
mod char;
167-
mod float;
168-
mod f32;
169-
mod f64;
170-
mod str;
171-
mod ptr;
172-
mod vec;
173-
mod at_vec;
174-
mod bool;
175-
mod tuple;
176-
mod unit;
177-
mod uniq;
166+
pub mod box;
167+
pub mod char;
168+
pub mod float;
169+
pub mod f32;
170+
pub mod f64;
171+
pub mod str;
172+
pub mod ptr;
173+
pub mod vec;
174+
pub mod at_vec;
175+
pub mod bool;
176+
pub mod tuple;
177+
pub mod unit;
178+
pub mod uniq;
178179

179180
// Ubiquitous-utility-type modules
180181

181182
#[cfg(notest)]
182-
mod ops;
183-
mod cmp;
184-
mod num;
185-
mod hash;
186-
mod either;
187-
mod iter;
188-
mod logging;
189-
mod option;
183+
pub mod ops;
184+
pub mod cmp;
185+
pub mod num;
186+
pub mod hash;
187+
pub mod either;
188+
pub mod iter;
189+
pub mod logging;
190+
pub mod option;
190191
#[path="iter-trait"]
191-
mod option_iter {
192+
pub mod option_iter {
192193
#[path = "option.rs"]
193-
mod inst;
194+
pub mod inst;
194195
}
195-
mod result;
196-
mod to_str;
197-
mod to_bytes;
198-
mod from_str;
199-
mod util;
196+
pub mod result;
197+
pub mod to_str;
198+
pub mod to_bytes;
199+
pub mod from_str;
200+
pub mod util;
200201

201202
// Data structure modules
202203

203-
mod dvec;
204+
pub mod dvec;
204205
#[path="iter-trait"]
205-
mod dvec_iter {
206+
pub mod dvec_iter {
206207
#[path = "dvec.rs"]
207-
mod inst;
208+
pub mod inst;
208209
}
209-
mod dlist;
210+
pub mod dlist;
210211
#[path="iter-trait"]
211-
mod dlist_iter {
212+
pub mod dlist_iter {
212213
#[path ="dlist.rs"]
213-
mod inst;
214+
pub mod inst;
214215
}
215-
mod send_map;
216+
pub mod send_map;
216217

217218
// Concurrency
218-
mod comm;
219-
mod task {
219+
pub mod comm;
220+
pub mod task {
220221
pub mod local_data;
221222
mod local_data_priv;
222223
pub mod spawn;
223224
pub mod rt;
224225
}
225-
mod future;
226-
mod pipes;
226+
pub mod future;
227+
pub mod pipes;
227228

228229
// Runtime and language-primitive support
229230

230-
mod gc;
231-
mod io;
232-
mod libc;
233-
mod os;
234-
mod path;
235-
mod rand;
236-
mod run;
237-
mod sys;
238-
mod cast;
239-
mod mutable;
240-
mod flate;
241-
mod repr;
242-
mod cleanup;
243-
mod reflect;
231+
pub mod gc;
232+
pub mod io;
233+
pub mod libc;
234+
pub mod os;
235+
pub mod path;
236+
pub mod rand;
237+
pub mod run;
238+
pub mod sys;
239+
pub mod cast;
240+
pub mod mutable;
241+
pub mod flate;
242+
pub mod repr;
243+
pub mod cleanup;
244+
pub mod reflect;
244245

245246
// Modules supporting compiler-generated code
246247
// Exported but not part of the public interface
247248

248249
#[legacy_exports]
249-
mod extfmt;
250+
pub mod extfmt;
250251
// The test harness links against core, so don't include runtime in tests.
251252
#[cfg(notest)]
252253
#[legacy_exports]
253-
mod rt;
254+
pub mod rt;
254255

255256

256257
// For internal use, not exported
257258

259+
pub mod private;
258260
mod unicode;
259-
mod private;
260261
mod cmath;
261262
mod stackwalk;
262263

0 commit comments

Comments
 (0)