Skip to content

Commit 5855cf8

Browse files
author
lucy
committed
---
yaml --- r: 114418 b: refs/heads/master c: 3d63370 h: refs/heads/master v: v3
1 parent 9fd5434 commit 5855cf8

File tree

24 files changed

+114
-37
lines changed

24 files changed

+114
-37
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 33c3eddd111bd708940f2e2fd84180cfae80e856
2+
refs/heads/master: 3d6337079fcd9299a1a9966d1ef51bd66bcaa814
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ec0258a381b88b5574e3f8ce72ae553ac3a574b7
55
refs/heads/try: 7c6c492fb2af9a85f21ff952942df3523b22fd17

trunk/src/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@ it's possible to use *dynamic* mutability via types like `std::cell::Cell` where
17101710
via dynamic checks and can fail at runtime.
17111711

17121712
The `Rc` and `Gc` types are not sendable, so they cannot be used to share memory between tasks. Safe
1713-
immutable and mutable shared memory is provided by the `sync::arc` module.
1713+
immutable and mutable shared memory is provided by the `extra::arc` module.
17141714

17151715
# Closures
17161716

trunk/src/libcollections/hashmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ static INITIAL_LOAD_FACTOR: Fraction = (9, 10);
659659
/// on creation by default, this means the ordering of the keys is
660660
/// randomized, but makes the tables more resistant to
661661
/// denial-of-service attacks (Hash DoS). This behaviour can be
662-
/// overridden with one of the constructors.
662+
/// overriden with one of the constructors.
663663
///
664664
/// It is required that the keys implement the `Eq` and `Hash` traits, although
665665
/// this can frequently be achieved by using `#[deriving(Eq, Hash)]`.

trunk/src/libcore/cell.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Shareable mutable containers.
11+
//! Sharable mutable containers.
1212
//!
1313
//! Values of the `Cell` and `RefCell` types may be mutated through
1414
//! shared references (i.e. the common `&T` type), whereas most Rust
@@ -41,7 +41,7 @@
4141
//! preventing crash bugs. Because of that, inherited mutability is
4242
//! preferred, and interior mutability is something of a last
4343
//! resort. Since cell types enable mutation where it would otherwise
44-
//! be disallowed though, there are occasions when interior
44+
//! be disallowed though, there are occassions when interior
4545
//! mutability might be appropriate, or even *must* be used, e.g.
4646
//!
4747
//! * Introducing inherited mutability roots to shared types.

trunk/src/libcore/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub trait FormatWriter {
7676
/// This function will return an instance of `FormatError` on error.
7777
fn write(&mut self, bytes: &[u8]) -> Result;
7878

79-
/// Glue for usage of the `write!` macro with implementers of this trait.
79+
/// Glue for usage of the `write!` macro with implementors of this trait.
8080
///
8181
/// This method should generally not be invoked manually, but rather through
8282
/// the `write!` macro itself.

trunk/src/libcore/intrinsics.rs

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,110 +360,189 @@ extern "rust-intrinsic" {
360360
/// Perform a volatile store to the `dst` pointer.
361361
pub fn volatile_store<T>(dst: *mut T, val: T);
362362

363+
/// Returns the square root of an `f32`
363364
pub fn sqrtf32(x: f32) -> f32;
365+
/// Returns the square root of an `f64`
364366
pub fn sqrtf64(x: f64) -> f64;
365367

368+
/// Raises an `f32` to an integer power.
366369
pub fn powif32(a: f32, x: i32) -> f32;
370+
/// Raises an `f64` to an integer power.
367371
pub fn powif64(a: f64, x: i32) -> f64;
368372

373+
/// Returns the sine of an `f32`.
369374
pub fn sinf32(x: f32) -> f32;
375+
/// Returns the sine of an `f64`.
370376
pub fn sinf64(x: f64) -> f64;
371377

378+
/// Returns the cosine of an `f32`.
372379
pub fn cosf32(x: f32) -> f32;
380+
/// Returns the cosine of an `f64`.
373381
pub fn cosf64(x: f64) -> f64;
374382

383+
/// Raises an `f32` to an `f32` power.
375384
pub fn powf32(a: f32, x: f32) -> f32;
385+
/// Raises an `f64` to an `f64` power.
376386
pub fn powf64(a: f64, x: f64) -> f64;
377387

388+
/// Returns the exponential of an `f32`.
378389
pub fn expf32(x: f32) -> f32;
390+
/// Returns the exponential of an `f64`.
379391
pub fn expf64(x: f64) -> f64;
380392

393+
/// Returns 2 raised to the power of an `f32`.
381394
pub fn exp2f32(x: f32) -> f32;
395+
/// Returns 2 raised to the power of an `f64`.
382396
pub fn exp2f64(x: f64) -> f64;
383397

398+
/// Returns the natural logarithm of an `f32`.
384399
pub fn logf32(x: f32) -> f32;
400+
/// Returns the natural logarithm of an `f64`.
385401
pub fn logf64(x: f64) -> f64;
386402

403+
/// Returns the base 10 logarithm of an `f32`.
387404
pub fn log10f32(x: f32) -> f32;
405+
/// Returns the base 10 logarithm of an `f64`.
388406
pub fn log10f64(x: f64) -> f64;
389407

408+
/// Returns the base 2 logarithm of an `f32`.
390409
pub fn log2f32(x: f32) -> f32;
410+
/// Returns the base 2 logarithm of an `f64`.
391411
pub fn log2f64(x: f64) -> f64;
392412

413+
/// Returns `a * b + c` for `f32` values.
393414
pub fn fmaf32(a: f32, b: f32, c: f32) -> f32;
415+
/// Returns `a * b + c` for `f64` values.
394416
pub fn fmaf64(a: f64, b: f64, c: f64) -> f64;
395417

418+
/// Returns the absolute value of an `f32`.
396419
pub fn fabsf32(x: f32) -> f32;
420+
/// Returns the absolute value of an `f64`.
397421
pub fn fabsf64(x: f64) -> f64;
398422

423+
/// Copies the sign from `y` to `x` for `f32` values.
399424
pub fn copysignf32(x: f32, y: f32) -> f32;
425+
/// Copies the sign from `y` to `x` for `f64` values.
400426
pub fn copysignf64(x: f64, y: f64) -> f64;
401427

428+
/// Returns the largest integer less than or equal to an `f32`.
402429
pub fn floorf32(x: f32) -> f32;
430+
/// Returns the largest integer less than or equal to an `f64`.
403431
pub fn floorf64(x: f64) -> f64;
404432

433+
/// Returns the smallest integer greater than or equal to an `f32`.
405434
pub fn ceilf32(x: f32) -> f32;
435+
/// Returns the smallest integer greater than or equal to an `f64`.
406436
pub fn ceilf64(x: f64) -> f64;
407437

438+
/// Returns the integer part of an `f32`.
408439
pub fn truncf32(x: f32) -> f32;
440+
/// Returns the integer part of an `f64`.
409441
pub fn truncf64(x: f64) -> f64;
410442

443+
/// Returns the nearest integer to an `f32`. May raise an inexact floating-point exception
444+
/// if the argument is not an integer.
411445
pub fn rintf32(x: f32) -> f32;
446+
/// Returns the nearest integer to an `f64`. May raise an inexact floating-point exception
447+
/// if the argument is not an integer.
412448
pub fn rintf64(x: f64) -> f64;
413449

450+
/// Returns the nearest integer to an `f32`.
414451
pub fn nearbyintf32(x: f32) -> f32;
452+
/// Returns the nearest integer to an `f64`.
415453
pub fn nearbyintf64(x: f64) -> f64;
416454

455+
/// Returns the nearest integer to an `f32`. Rounds half-way cases away from zero.
417456
pub fn roundf32(x: f32) -> f32;
457+
/// Returns the nearest integer to an `f64`. Rounds half-way cases away from zero.
418458
pub fn roundf64(x: f64) -> f64;
419459

460+
/// Returns the number of bits set in a `u8`.
420461
pub fn ctpop8(x: u8) -> u8;
462+
/// Returns the number of bits set in a `u16`.
421463
pub fn ctpop16(x: u16) -> u16;
464+
/// Returns the number of bits set in a `u32`.
422465
pub fn ctpop32(x: u32) -> u32;
466+
/// Returns the number of bits set in a `u64`.
423467
pub fn ctpop64(x: u64) -> u64;
424468

469+
/// Returns the number of leading bits unset in a `u8`.
425470
pub fn ctlz8(x: u8) -> u8;
471+
/// Returns the number of leading bits unset in a `u16`.
426472
pub fn ctlz16(x: u16) -> u16;
473+
/// Returns the number of leading bits unset in a `u32`.
427474
pub fn ctlz32(x: u32) -> u32;
475+
/// Returns the number of leading bits unset in a `u64`.
428476
pub fn ctlz64(x: u64) -> u64;
429477

478+
/// Returns the number of trailing bits unset in a `u8`.
430479
pub fn cttz8(x: u8) -> u8;
480+
/// Returns the number of trailing bits unset in a `u16`.
431481
pub fn cttz16(x: u16) -> u16;
482+
/// Returns the number of trailing bits unset in a `u32`.
432483
pub fn cttz32(x: u32) -> u32;
484+
/// Returns the number of trailing bits unset in a `u64`.
433485
pub fn cttz64(x: u64) -> u64;
434486

487+
/// Reverses the bytes in a `u16`.
435488
pub fn bswap16(x: u16) -> u16;
489+
/// Reverses the bytes in a `u32`.
436490
pub fn bswap32(x: u32) -> u32;
491+
/// Reverses the bytes in a `u64`.
437492
pub fn bswap64(x: u64) -> u64;
438493

494+
/// Performs checked `i8` addition.
439495
pub fn i8_add_with_overflow(x: i8, y: i8) -> (i8, bool);
496+
/// Performs checked `i16` addition.
440497
pub fn i16_add_with_overflow(x: i16, y: i16) -> (i16, bool);
498+
/// Performs checked `i32` addition.
441499
pub fn i32_add_with_overflow(x: i32, y: i32) -> (i32, bool);
500+
/// Performs checked `i64` addition.
442501
pub fn i64_add_with_overflow(x: i64, y: i64) -> (i64, bool);
443502

503+
/// Performs checked `u8` addition.
444504
pub fn u8_add_with_overflow(x: u8, y: u8) -> (u8, bool);
505+
/// Performs checked `u16` addition.
445506
pub fn u16_add_with_overflow(x: u16, y: u16) -> (u16, bool);
507+
/// Performs checked `u32` addition.
446508
pub fn u32_add_with_overflow(x: u32, y: u32) -> (u32, bool);
509+
/// Performs checked `u64` addition.
447510
pub fn u64_add_with_overflow(x: u64, y: u64) -> (u64, bool);
448511

512+
/// Performs checked `i8` subtraction.
449513
pub fn i8_sub_with_overflow(x: i8, y: i8) -> (i8, bool);
514+
/// Performs checked `i16` subtraction.
450515
pub fn i16_sub_with_overflow(x: i16, y: i16) -> (i16, bool);
516+
/// Performs checked `i32` subtraction.
451517
pub fn i32_sub_with_overflow(x: i32, y: i32) -> (i32, bool);
518+
/// Performs checked `i64` subtraction.
452519
pub fn i64_sub_with_overflow(x: i64, y: i64) -> (i64, bool);
453520

521+
/// Performs checked `u8` subtraction.
454522
pub fn u8_sub_with_overflow(x: u8, y: u8) -> (u8, bool);
523+
/// Performs checked `u16` subtraction.
455524
pub fn u16_sub_with_overflow(x: u16, y: u16) -> (u16, bool);
525+
/// Performs checked `u32` subtraction.
456526
pub fn u32_sub_with_overflow(x: u32, y: u32) -> (u32, bool);
527+
/// Performs checked `u64` subtraction.
457528
pub fn u64_sub_with_overflow(x: u64, y: u64) -> (u64, bool);
458529

530+
/// Performs checked `i8` multiplication.
459531
pub fn i8_mul_with_overflow(x: i8, y: i8) -> (i8, bool);
532+
/// Performs checked `i16` multiplication.
460533
pub fn i16_mul_with_overflow(x: i16, y: i16) -> (i16, bool);
534+
/// Performs checked `i32` multiplication.
461535
pub fn i32_mul_with_overflow(x: i32, y: i32) -> (i32, bool);
536+
/// Performs checked `i64` multiplication.
462537
pub fn i64_mul_with_overflow(x: i64, y: i64) -> (i64, bool);
463538

539+
/// Performs checked `u8` multiplication.
464540
pub fn u8_mul_with_overflow(x: u8, y: u8) -> (u8, bool);
541+
/// Performs checked `u16` multiplication.
465542
pub fn u16_mul_with_overflow(x: u16, y: u16) -> (u16, bool);
543+
/// Performs checked `u32` multiplication.
466544
pub fn u32_mul_with_overflow(x: u32, y: u32) -> (u32, bool);
545+
/// Performs checked `u64` multiplication.
467546
pub fn u64_mul_with_overflow(x: u64, y: u64) -> (u64, bool);
468547
}
469548

trunk/src/libcore/iter.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -872,12 +872,10 @@ pub trait OrdIterator<A> {
872872
/// `min_max` finds the minimum and maximum elements in the iterator.
873873
///
874874
/// The return type `MinMaxResult` is an enum of three variants:
875-
///
876875
/// - `NoElements` if the iterator is empty.
877876
/// - `OneElement(x)` if the iterator has exactly one element.
878-
/// - `MinMax(x, y)` is returned otherwise, where `x <= y`. Two
879-
/// values are equal if and only if there is more than one
880-
/// element in the iterator and all elements are equal.
877+
/// - `MinMax(x, y)` is returned otherwise, where `x <= y`. Two values are equal if and only if
878+
/// there is more than one element in the iterator and all elements are equal.
881879
///
882880
/// On an iterator of length `n`, `min_max` does `1.5 * n` comparisons,
883881
/// and so faster than calling `min` and `max separately which does `2 * n` comparisons.

trunk/src/libcore/kinds.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ pub mod marker {
266266
#[deriving(Eq,Clone)]
267267
pub struct NoCopy;
268268

269-
/// A type which is considered "not shareable", meaning that
269+
/// A type which is considered "not sharable", meaning that
270270
/// its contents are not threadsafe, hence they cannot be
271271
/// shared between tasks.
272272
#[lang="no_share_bound"]

trunk/src/libcore/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
//! The suitability of `fail!` as an error handling mechanism is
261261
//! limited by Rust's lack of any way to "catch" and resume execution
262262
//! from a thrown exception. Therefore using failure for error
263-
//! handling requires encapsulating fallible code in a task. Calling
263+
//! handling requires encapsulating fallable code in a task. Calling
264264
//! the `fail!` macro, or invoking `fail!` indirectly should be
265265
//! avoided as an error reporting strategy. Failure is only for
266266
//! unrecoverable errors and a failing task is typically the sign of

trunk/src/libgetopts/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ pub enum Fail_ {
190190
UnrecognizedOption(StrBuf),
191191
/// A required option is not present.
192192
OptionMissing(StrBuf),
193-
/// A single occurrence option is being used multiple times.
193+
/// A single occurence option is being used multiple times.
194194
OptionDuplicated(StrBuf),
195195
/// There's an argument being passed to a non-argument option.
196196
UnexpectedArgument(StrBuf),

trunk/src/libgraphviz/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ pub trait Labeller<'a,N,E> {
395395
fn graph_id(&'a self) -> Id<'a>;
396396

397397
/// Maps `n` to a unique identifier with respect to `self`. The
398-
/// implementer is responsible for ensuring that the returned name
398+
/// implementor is responsible for ensuring that the returned name
399399
/// is a valid DOT identifier.
400400
fn node_id(&'a self, n: &N) -> Id<'a>;
401401

@@ -457,7 +457,7 @@ pub type Edges<'a,E> = MaybeOwnedVector<'a,E>;
457457
/// that is bound by the self lifetime `'a`.
458458
///
459459
/// The `nodes` and `edges` method each return instantiations of
460-
/// `MaybeOwnedVector` to leave implementers the freedom to create
460+
/// `MaybeOwnedVector` to leave implementors the freedom to create
461461
/// entirely new vectors or to pass back slices into internally owned
462462
/// vectors.
463463
pub trait GraphWalk<'a, N, E> {

trunk/src/libgraphviz/maybe_owned_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use std::slice;
3131
/// Some clients will have a pre-allocated vector ready to hand off in
3232
/// a slice; others will want to create the set on the fly and hand
3333
/// off ownership, via either `Growable` or `FixedLen` depending on
34-
/// which kind of vector they have constructed. (The `FixedLen`
34+
/// which kind of vector they have constucted. (The `FixedLen`
3535
/// variant is provided for interoperability with `std::slice` methods
3636
/// that return `~[T]`.)
3737
pub enum MaybeOwnedVector<'a,T> {

trunk/src/libgreen/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
//! }
126126
//! ```
127127
//!
128-
//! > **Note**: This `main` function in this example does *not* have I/O
128+
//! > **Note**: This `main` funciton in this example does *not* have I/O
129129
//! > support. The basic event loop does not provide any support
130130
//!
131131
//! # Starting with I/O support in libgreen

trunk/src/libnative/io/timer_unix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
//!
2424
//! Whenever the call to select() times out, then a channel receives a message.
2525
//! Whenever the call returns that the file descriptor has information, then the
26-
//! channel from timers is drained, enqueuing all incoming requests.
26+
//! channel from timers is drained, enqueueing all incoming requests.
2727
//!
2828
//! The actual implementation of the helper thread is a sorted array of
2929
//! timers in terms of target firing date. The target is the absolute time at
@@ -42,7 +42,7 @@
4242
//! thread. Whenever the timer is modified, it first takes ownership back from
4343
//! the worker thread in order to modify the same data structure. This has the
4444
//! side effect of "cancelling" the previous requests while allowing a
45-
//! re-enqueuing later on.
45+
//! re-enqueueing later on.
4646
//!
4747
//! Note that all time units in this file are in *milliseconds*.
4848

trunk/src/librustc/middle/borrowck/doc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ the pointer itself `LV` goes out of scope:
424424
```
425425
426426
The scope of a managed referent is also the scope of the pointer. This
427-
is a conservative approximation, since there may be other aliases for
427+
is a conservative approximation, since there may be other aliases fo
428428
that same managed box that would cause it to live longer:
429429
430430
```notrust
@@ -536,7 +536,7 @@ The final rules govern the computation of *restrictions*, meaning that
536536
we compute the set of actions that will be illegal for the life of the
537537
loan. The predicate is written `RESTRICTIONS(LV, LT, ACTIONS) =
538538
RESTRICTION*`, which can be read "in order to prevent `ACTIONS` from
539-
occurring on `LV`, the restrictions `RESTRICTION*` must be respected
539+
occuring on `LV`, the restrictions `RESTRICTION*` must be respected
540540
for the lifetime of the loan".
541541
542542
Note that there is an initial set of restrictions: these restrictions
@@ -551,7 +551,7 @@ are computed based on the kind of borrow:
551551
The reasoning here is that a mutable borrow must be the only writer,
552552
therefore it prevents other writes (`MUTATE`), mutable borrows
553553
(`CLAIM`), and immutable borrows (`FREEZE`). An immutable borrow
554-
permits other immutable borrows but forbids writes and mutable borows.
554+
permits other immutable borows but forbids writes and mutable borows.
555555
Finally, a const borrow just wants to be sure that the value is not
556556
moved out from under it, so no actions are forbidden.
557557

trunk/src/librustc/middle/trans/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub struct CrateContext {
7373
/// came from)
7474
pub external_srcs: RefCell<NodeMap<ast::DefId>>,
7575
/// A set of static items which cannot be inlined into other crates. This
76-
/// will prevent in IIItem() structures from being encoded into the metadata
76+
/// will pevent in IIItem() structures from being encoded into the metadata
7777
/// that is generated
7878
pub non_inlineable_statics: RefCell<NodeSet>,
7979
/// Cache instances of monomorphized functions

trunk/src/librustc/middle/typeck/infer/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ yet, that's what we're trying to find! In our code, we opt to unify
244244
245245
# Implementation details
246246
247-
We make use of a trait-like implementation strategy to consolidate
247+
We make use of a trait-like impementation strategy to consolidate
248248
duplicated code between subtypes, GLB, and LUB computations. See the
249249
section on "Type Combining" below for details.
250250

trunk/src/librustuv/timeout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use uvio::UvIoFactory;
2121
use {Loop, UvError, uv_error_to_io_error, Request, wakeup};
2222
use {UvHandle, wait_until_woken_after};
2323

24-
/// Management of a timeout when gaining access to a portion of a duplex stream.
24+
/// Managment of a timeout when gaining access to a portion of a duplex stream.
2525
pub struct AccessTimeout {
2626
state: TimeoutState,
2727
timer: Option<Box<TimerWatcher>>,

0 commit comments

Comments
 (0)