Skip to content

Commit 20402bf

Browse files
committed
---
yaml --- r: 32692 b: refs/heads/dist-snap c: c115b82 h: refs/heads/master v: v3
1 parent b884ffb commit 20402bf

24 files changed

+157
-77
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 5e417395620f6d6ce45761d9ea72376c792ef60a
10+
refs/heads/dist-snap: c115b822384501e2814da70fdcb9e22f035a994b
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/libcore/cleanup.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#[doc(hidden)];
2+
13
use libc::{c_char, c_void, intptr_t, uintptr_t};
24
use ptr::{mut_null, null, to_unsafe_ptr};
35
use repr::BoxRepr;

branches/dist-snap/src/libcore/cmath.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[doc(hidden)]; // FIXME #3538
12
// NB: transitionary, de-mode-ing.
23
#[forbid(deprecated_mode)];
34
#[forbid(deprecated_pattern)];

branches/dist-snap/src/libcore/cmp.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*!
2+
3+
The `Ord` and `Eq` comparison traits
4+
5+
This module contains the definition of both `Ord` and `Eq` which define
6+
the common interfaces for doing comparison. Both are language items
7+
that the compiler uses to implement the comparison operators. Rust code
8+
may implement `Ord` to overload the `<`, `<=`, `>`, and `>=` operators,
9+
and `Eq` to overload the `==` and `!=` operators.
10+
11+
*/
12+
113
// NB: transitionary, de-mode-ing.
214
#[forbid(deprecated_mode)];
315
#[forbid(deprecated_pattern)];
@@ -30,8 +42,6 @@ trait Ord {
3042
pure fn gt(&&other: self) -> bool;
3143
}
3244

33-
#[cfg(notest)]
34-
#[lang="eq"]
3545
/**
3646
* Trait for values that can be compared for equality
3747
* and inequality.
@@ -40,6 +50,8 @@ trait Ord {
4050
* an `eq` method, with the other generated from
4151
* a default implementation.
4252
*/
53+
#[cfg(notest)]
54+
#[lang="eq"]
4355
trait Eq {
4456
pure fn eq(&&other: self) -> bool;
4557
pure fn ne(&&other: self) -> bool;

branches/dist-snap/src/libcore/comm.rs

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
1+
/*!
2+
3+
Deprecated communication between tasks
4+
5+
Communication between tasks is facilitated by ports (in the receiving
6+
task), and channels (in the sending task). Any number of channels may
7+
feed into a single port. Ports and channels may only transmit values
8+
of unique types; that is, values that are statically guaranteed to be
9+
accessed by a single 'owner' at a time. Unique types include scalars,
10+
vectors, strings, and records, tags, tuples and unique boxes (`~T`)
11+
thereof. Most notably, shared boxes (`@T`) may not be transmitted
12+
across channels.
13+
14+
# Example
15+
16+
~~~
17+
let po = comm::Port();
18+
let ch = comm::Chan(po);
19+
20+
do task::spawn {
21+
comm::send(ch, "Hello, World");
22+
}
23+
24+
io::println(comm::recv(p));
25+
~~~
26+
27+
# Note
28+
29+
Use of this module is deprecated in favor of `core::pipes`. In the
30+
`core::comm` will likely be rewritten with pipes, at which point it
31+
will once again be the preferred module for intertask communication.
32+
33+
*/
34+
135
// NB: transitionary, de-mode-ing.
236
#[forbid(deprecated_mode)];
337
#[forbid(deprecated_pattern)];
4-
/*!
5-
* Communication between tasks
6-
*
7-
* Communication between tasks is facilitated by ports (in the receiving
8-
* task), and channels (in the sending task). Any number of channels may
9-
* feed into a single port. Ports and channels may only transmit values
10-
* of unique types; that is, values that are statically guaranteed to be
11-
* accessed by a single 'owner' at a time. Unique types include scalars,
12-
* vectors, strings, and records, tags, tuples and unique boxes (`~T`)
13-
* thereof. Most notably, shared boxes (`@T`) may not be transmitted
14-
* across channels.
15-
*
16-
* # Example
17-
*
18-
* ~~~
19-
* let po = comm::Port();
20-
* let ch = comm::Chan(po);
21-
*
22-
* do task::spawn {
23-
* comm::send(ch, "Hello, World");
24-
* }
25-
*
26-
* io::println(comm::recv(p));
27-
* ~~~
28-
*/
2938

3039
use either::Either;
3140
use libc::size_t;

branches/dist-snap/src/libcore/core.rc

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
/*!
2+
3+
The Rust core library.
4+
5+
The Rust core library provides runtime features required by the language,
6+
including the task scheduler and memory allocators, as well as library
7+
support for Rust built-in types, platform abstractions, and other commonly
8+
used features.
9+
10+
`core` includes modules corresponding to each of the integer types, each of
11+
the floating point types, the `bool` type, tuples, characters, strings,
12+
vectors (`vec`), shared boxes (`box`), and unsafe and borrowed pointers
13+
(`ptr`). Additionally, `core` provides very commonly used built-in types
14+
and operations, concurrency primitives, platform abstractions, I/O, and
15+
complete bindings to the C standard library.
16+
17+
`core` is linked to all crates and its contents imported. Implicitly, all
18+
crates behave as if they included the following prologue:
19+
20+
extern mod core;
21+
use core::*;
22+
23+
*/
24+
125
#[link(name = "core",
226
vers = "0.4",
327
uuid = "c70c24a7-5551-4f73-8e37-380b11d80be8",
@@ -7,27 +31,6 @@
731
#[license = "MIT"];
832
#[crate_type = "lib"];
933

10-
/*!
11-
* The Rust core library provides functionality that is closely tied to the
12-
* Rust built-in types and runtime services, or that is used in nearly every
13-
* non-trivial program.
14-
*
15-
* `core` includes modules corresponding to each of the integer types, each of
16-
* the floating point types, the `bool` type, tuples, characters, strings,
17-
* vectors (`vec`), shared boxes (`box`), and unsafe pointers (`ptr`).
18-
* Additionally, `core` provides very commonly used built-in types and
19-
* operations, concurrency primitives, platform abstractions, I/O, and
20-
* complete bindings to the C 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:
24-
*
25-
* use core;
26-
* import core::*;
27-
*
28-
* This behavior can be disabled with the `#[no_core]` crate attribute.
29-
*/
30-
3134
// Don't link to core. We are core.
3235
#[no_core];
3336

branches/dist-snap/src/libcore/core.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ const debug : u32 = 3_u32;
8282
// A curious inner-module that's not exported that contains the binding
8383
// 'core' so that macro-expanded references to core::error and such
8484
// can be resolved within libcore.
85+
#[doc(hidden)] // FIXME #3538
8586
mod core {
8687
const error : u32 = 0_u32;
8788
const warn : u32 = 1_u32;

branches/dist-snap/src/libcore/dlist.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
/*!
2+
3+
A doubly-linked list. Supports O(1) head, tail, count, push, pop, etc.
4+
5+
# Safety note
6+
7+
Do not use ==, !=, <, etc on doubly-linked lists -- it may not terminate.
8+
9+
*/
10+
111
// NB: transitionary, de-mode-ing.
212
#[forbid(deprecated_mode)];
313
#[forbid(deprecated_pattern)];
414

5-
/**
6-
* A doubly-linked list. Supports O(1) head, tail, count, push, pop, etc.
7-
*
8-
* Do not use ==, !=, <, etc on doubly-linked lists -- it may not terminate.
9-
*/
10-
1115
export DList;
1216
export new_dlist, from_elem, from_vec, extensions;
1317

branches/dist-snap/src/libcore/dvec.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1+
/*!
2+
3+
Dynamic vector
4+
5+
A growable vector that makes use of unique pointers so that the
6+
result can be sent between tasks and so forth.
7+
8+
Note that recursive use is not permitted.
9+
10+
*/
11+
112
// NB: transitionary, de-mode-ing.
213
#[forbid(deprecated_mode)];
314
#[forbid(deprecated_pattern)];
415

5-
// Dynamic Vector
6-
//
7-
// A growable vector that makes use of unique pointers so that the
8-
// result can be sent between tasks and so forth.
9-
//
10-
// Note that recursive use is not permitted.
11-
1216
use cast::reinterpret_cast;
1317
use ptr::null;
1418

branches/dist-snap/src/libcore/flate.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*!
2+
3+
Simple compression
4+
5+
*/
6+
17
use libc::{c_void, size_t, c_int};
28

39
extern mod rustrt {

branches/dist-snap/src/libcore/from_str.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! The trait for types that can be created from strings
2+
13
use option::Option;
24

35
trait FromStr {

branches/dist-snap/src/libcore/gc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Precise Garbage Collector
1+
/*! Precise garbage collector
22
33
The precise GC exposes two functions, gc and
44
cleanup_stack_for_failure. The gc function is the entry point to the

branches/dist-snap/src/libcore/io.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/*
2-
Module: io
1+
/*!
32
43
Basic input/output
4+
55
*/
66

77
use result::Result;

branches/dist-snap/src/libcore/iter.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*!
2+
3+
The iteration traits and common implementation
4+
5+
*/
6+
17
use cmp::{Eq, Ord};
28

39
/// A function used to initialize the elements of a sequence

branches/dist-snap/src/libcore/num.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// An interface for numbers.
1+
//! An interface for numeric types
22
33
trait Num {
44
// FIXME: Trait composition. (#2616)

branches/dist-snap/src/libcore/path.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*!
2+
3+
Cross-platform file path handling
4+
5+
*/
6+
17
// NB: transitionary, de-mode-ing.
28
#[forbid(deprecated_mode)];
39
#[forbid(deprecated_pattern)];

branches/dist-snap/src/libcore/reflect.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/*!
2-
* Helper types for interfacing with the `intrinsic::visit_ty`
3-
* reflection system.
4-
*/
2+
3+
Runtime type reflection
4+
5+
*/
56

67
use intrinsic::{TyDesc, get_tydesc, visit_tydesc, TyVisitor};
78
use libc::c_void;

branches/dist-snap/src/libcore/repr.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*!
2+
3+
More runtime type reflection
4+
5+
*/
6+
17
use dvec::DVec;
28
use io::{Writer, WriterUtil};
39
use libc::c_void;

branches/dist-snap/src/libcore/stackwalk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// NB: Don't rely on other core mods here as this has to move into the rt
1+
#[doc(hidden)]; // FIXME #3538
22

33
use cast::reinterpret_cast;
44
use ptr::offset;

branches/dist-snap/src/libcore/to_bytes.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*!
2+
3+
The `ToBytes` and `IterBytes` traits
4+
5+
*/
6+
17
// NB: transitionary, de-mode-ing.
28
#[forbid(deprecated_mode)];
39
#[forbid(deprecated_pattern)];

branches/dist-snap/src/libcore/to_str.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*!
2+
3+
The `ToStr` trait for converting to strings
4+
5+
*/
6+
17
// NB: transitionary, de-mode-ing.
28
#[forbid(deprecated_mode)];
39
#[forbid(deprecated_pattern)];

branches/dist-snap/src/libcore/unicode.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[doc(hidden)]; // FIXME #3538
12
// NB: transitionary, de-mode-ing.
23
#[forbid(deprecated_mode)];
34
#[forbid(deprecated_pattern)];

branches/dist-snap/src/libcore/unit.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
/**
2-
* Functions for the unit type.
3-
*/
1+
/*!
2+
3+
Functions for the unit type.
4+
5+
*/
46

57
use cmp::{Eq, Ord};
68

branches/dist-snap/src/libcore/util.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1+
/*!
2+
3+
Miscellaneous helpers for common patterns.
4+
5+
*/
6+
17
// NB: transitionary, de-mode-ing.
28
#[forbid(deprecated_mode)];
39
#[forbid(deprecated_pattern)];
410

511
use cmp::Eq;
612

7-
/**
8-
* Miscellaneous helpers for common patterns.
9-
*/
10-
1113
/// The identity function.
1214
#[inline(always)]
1315
pure fn id<T>(+x: T) -> T { move x }

0 commit comments

Comments
 (0)