7
7
#[license = "MIT"];
8
8
#[crate_type = "lib"];
9
9
10
- // Don't link to core. We are core.
11
- #[no_core];
12
-
13
10
#[doc = "
14
- The Rust core library
15
-
16
- The core library provides functionality that is closely tied to the Rust
11
+ The Rust core library provides functionality that is closely tied to the Rust
17
12
built-in types and runtime services, or that is used in nearly every
18
13
non-trivial program.
19
14
20
- It is linked by default to all crates and the contents imported. The effect is
21
- as though the user had written the following:
15
+ `core` includes modules corresponding to each of the integer types, each of
16
+ the floating point types, the `bool` type, tules, characters, strings, vectors
17
+ (`vec`), shared boxes (`box`), and unsafe pointers (`ptr`). Additionally,
18
+ `core` provides very commonly used built-in types and operations, concurrency
19
+ primitives, platform abstractions, I/O, and complete bindings to the C
20
+ standard library.
21
+
22
+ `core` is linked by default to all crates and the contents imported.
23
+ Implicitly, all crates behave as if they included the following prologue:
22
24
23
25
use core;
24
26
import core::*;
25
27
26
- This behavior can be disabled with the `no_core` crate attribute.
28
+ This behavior can be disabled with the `#[ no_core] ` crate attribute.
27
29
"];
28
30
31
+ // Don't link to core. We are core.
32
+ #[no_core];
33
+
29
34
export int, i8, i16, i32, i64;
30
35
export uint, u8, u16, u32, u64;
31
36
export float, f32, f64;
@@ -42,6 +47,7 @@ export to_str;
42
47
// core this should become unexported
43
48
export priv;
44
49
50
+
45
51
// Built-in-type support modules
46
52
47
53
#[doc = "Operations and constants for `int`"]
@@ -129,6 +135,7 @@ mod u64 {
129
135
mod inst;
130
136
}
131
137
138
+
132
139
mod box;
133
140
mod char;
134
141
mod float;
@@ -138,48 +145,50 @@ mod str;
138
145
mod ptr;
139
146
mod vec;
140
147
mod bool;
148
+ mod tuple;
141
149
142
- // For internal use by char, not exported
143
- mod unicode;
144
- // Do not export
145
- mod priv;
146
150
147
151
// Ubiquitous-utility-type modules
148
152
149
153
mod either;
154
+ mod iter;
155
+ mod logging;
150
156
mod option;
151
157
mod result;
152
- mod tuple;
153
- mod iter;
158
+ mod to_str;
154
159
155
- // Useful ifaces
156
160
157
- mod to_str;
161
+ // Concurrency
162
+ mod comm;
163
+ mod task;
164
+ mod future;
165
+
158
166
159
167
// Runtime and language-primitive support
160
168
169
+ mod io;
161
170
mod libc;
162
171
mod os;
163
- mod io;
164
- mod run;
165
- mod rand;
166
172
mod path;
167
-
168
- mod cmath ;
173
+ mod rand;
174
+ mod run ;
169
175
mod sys;
170
176
mod unsafe;
171
- mod logging;
172
177
173
- // Concurrency
174
- mod comm;
175
- mod task;
176
- mod future;
177
178
178
- // Compiler support modules
179
+ // Modules supporting compiler-generated code
180
+ // Exported but not part of the public interface
179
181
180
182
mod extfmt;
181
183
182
184
185
+ // For internal use, not exported
186
+
187
+ mod unicode;
188
+ mod priv;
189
+ mod cmath;
190
+
191
+
183
192
// Local Variables:
184
193
// mode: rust;
185
194
// fill-column: 78;
0 commit comments