Skip to content

Commit e9bc24d

Browse files
committed
---
yaml --- r: 273406 b: refs/heads/beta c: 06d8b21 h: refs/heads/master
1 parent 4498387 commit e9bc24d

File tree

46 files changed

+204
-1682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+204
-1682
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 3c3b9ad76ac16e1a0709aa161432b73f64b7a26e
26+
refs/heads/beta: 06d8b21372742234c95e1ea842e4d66aa9ee9dd5
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/doc/book/error-handling.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,16 +2019,6 @@ impl Error for CliError {
20192019
CliError::NotFound => "not found",
20202020
}
20212021
}
2022-
2023-
fn cause(&self) -> Option<&error::Error> {
2024-
match *self {
2025-
CliError::Io(ref err) => Some(err),
2026-
CliError::Parse(ref err) => Some(err),
2027-
// Our custom error doesn't have an underlying cause, but we could
2028-
// modify it so that it does.
2029-
CliError::NotFound() => None,
2030-
}
2031-
}
20322022
}
20332023
```
20342024

branches/beta/src/doc/book/primitive-types.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ of these ones, as well, but these are the most primitive.
77

88
# Booleans
99

10-
Rust has a built-in boolean type, named `bool`. It has two values, `true` and `false`:
10+
Rust has a built in boolean type, named `bool`. It has two values, `true` and `false`:
1111

1212
```rust
1313
let x = true;
@@ -89,13 +89,13 @@ Unsigned types use a `u` for their category, and signed types use `i`. The `i`
8989
is for ‘integer’. So `u8` is an eight-bit unsigned number, and `i8` is an
9090
eight-bit signed number.
9191

92-
## Fixed-size types
92+
## Fixed size types
9393

94-
Fixed-size types have a specific number of bits in their representation. Valid
94+
Fixed size types have a specific number of bits in their representation. Valid
9595
bit sizes are `8`, `16`, `32`, and `64`. So, `u32` is an unsigned, 32-bit integer,
9696
and `i64` is a signed, 64-bit integer.
9797

98-
## Variable-size types
98+
## Variable sized types
9999

100100
Rust also provides types whose size depends on the size of a pointer of the
101101
underlying machine. These types have ‘size’ as the category, and come in signed

branches/beta/src/doc/book/references-and-borrowing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ fn main() {
212212

213213
In other words, the mutable borrow is held through the rest of our example. What
214214
we want is for the mutable borrow by `y` to end so that the resource can be
215-
returned to the owner, `x`. `x` can then provide a mutable borrow to `println!`.
215+
returned to the owner, `x`. `x` can then provide a immutable borrow to `println!`.
216216
In Rust, borrowing is tied to the scope that the borrow is valid for. And our
217217
scopes look like this:
218218

branches/beta/src/libcore/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
authors = ["The Rust Project Developers"]
33
name = "core"
44
version = "0.0.0"
5-
build = "build.rs"
65

76
[lib]
87
name = "core"

branches/beta/src/libcore/build.rs

Lines changed: 0 additions & 14 deletions
This file was deleted.

branches/beta/src/libcore/char.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,14 @@ pub fn encode_utf16_raw(mut ch: u32, dst: &mut [u16]) -> Option<usize> {
416416
///
417417
/// [`escape_unicode()`]: ../../std/primitive.char.html#method.escape_unicode
418418
/// [`char`]: ../../std/primitive.char.html
419-
#[derive(Clone, Debug)]
419+
#[derive(Clone)]
420420
#[stable(feature = "rust1", since = "1.0.0")]
421421
pub struct EscapeUnicode {
422422
c: char,
423423
state: EscapeUnicodeState
424424
}
425425

426-
#[derive(Clone, Debug)]
426+
#[derive(Clone)]
427427
enum EscapeUnicodeState {
428428
Backslash,
429429
Type,
@@ -496,13 +496,13 @@ impl Iterator for EscapeUnicode {
496496
///
497497
/// [`escape_default()`]: ../../std/primitive.char.html#method.escape_default
498498
/// [`char`]: ../../std/primitive.char.html
499-
#[derive(Clone, Debug)]
499+
#[derive(Clone)]
500500
#[stable(feature = "rust1", since = "1.0.0")]
501501
pub struct EscapeDefault {
502502
state: EscapeDefaultState
503503
}
504504

505-
#[derive(Clone, Debug)]
505+
#[derive(Clone)]
506506
enum EscapeDefaultState {
507507
Backslash(char),
508508
Char(char),

branches/beta/src/libcore/cmp.rs

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,6 @@
1414
//! by the compiler to implement comparison operators. Rust programs may
1515
//! implement `PartialOrd` to overload the `<`, `<=`, `>`, and `>=` operators,
1616
//! and may implement `PartialEq` to overload the `==` and `!=` operators.
17-
//!
18-
//! # Examples
19-
//!
20-
//! ```
21-
//! let x: u32 = 0;
22-
//! let y: u32 = 1;
23-
//!
24-
//! // these two lines are equivalent
25-
//! assert_eq!(x < y, true);
26-
//! assert_eq!(x.lt(&y), true);
27-
//!
28-
//! // these two lines are also equivalent
29-
//! assert_eq!(x == y, false);
30-
//! assert_eq!(x.eq(&y), false);
31-
//! ```
3217
3318
#![stable(feature = "rust1", since = "1.0.0")]
3419

@@ -59,16 +44,6 @@ use option::Option::{self, Some};
5944
/// only if `a != b`.
6045
///
6146
/// This trait can be used with `#[derive]`.
62-
///
63-
/// # Examples
64-
///
65-
/// ```
66-
/// let x: u32 = 0;
67-
/// let y: u32 = 1;
68-
///
69-
/// assert_eq!(x == y, false);
70-
/// assert_eq!(x.eq(&y), false);
71-
/// ```
7247
#[lang = "eq"]
7348
#[stable(feature = "rust1", since = "1.0.0")]
7449
pub trait PartialEq<Rhs: ?Sized = Self> {
@@ -251,16 +226,6 @@ impl PartialOrd for Ordering {
251226
///
252227
/// This trait can be used with `#[derive]`. When `derive`d, it will produce an ordering
253228
/// based on the top-to-bottom declaration order of the struct's members.
254-
///
255-
/// # Examples
256-
///
257-
/// ```
258-
/// let x : u32 = 0;
259-
/// let y : u32 = 1;
260-
///
261-
/// assert_eq!(x < y, true);
262-
/// assert_eq!(x.lt(&y), true);
263-
/// ```
264229
#[lang = "ord"]
265230
#[stable(feature = "rust1", since = "1.0.0")]
266231
pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {

branches/beta/src/libcore/fmt/builders.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ impl<'a, 'b: 'a> fmt::Write for PadAdapter<'a, 'b> {
5454
///
5555
/// Constructed by the `Formatter::debug_struct` method.
5656
#[must_use]
57-
#[allow(missing_debug_implementations)]
5857
#[stable(feature = "debug_builders", since = "1.2.0")]
5958
pub struct DebugStruct<'a, 'b: 'a> {
6059
fmt: &'a mut fmt::Formatter<'b>,
@@ -121,7 +120,6 @@ impl<'a, 'b: 'a> DebugStruct<'a, 'b> {
121120
///
122121
/// Constructed by the `Formatter::debug_tuple` method.
123122
#[must_use]
124-
#[allow(missing_debug_implementations)]
125123
#[stable(feature = "debug_builders", since = "1.2.0")]
126124
pub struct DebugTuple<'a, 'b: 'a> {
127125
fmt: &'a mut fmt::Formatter<'b>,
@@ -233,7 +231,6 @@ impl<'a, 'b: 'a> DebugInner<'a, 'b> {
233231
///
234232
/// Constructed by the `Formatter::debug_set` method.
235233
#[must_use]
236-
#[allow(missing_debug_implementations)]
237234
#[stable(feature = "debug_builders", since = "1.2.0")]
238235
pub struct DebugSet<'a, 'b: 'a> {
239236
inner: DebugInner<'a, 'b>,
@@ -282,7 +279,6 @@ impl<'a, 'b: 'a> DebugSet<'a, 'b> {
282279
///
283280
/// Constructed by the `Formatter::debug_list` method.
284281
#[must_use]
285-
#[allow(missing_debug_implementations)]
286282
#[stable(feature = "debug_builders", since = "1.2.0")]
287283
pub struct DebugList<'a, 'b: 'a> {
288284
inner: DebugInner<'a, 'b>,
@@ -331,7 +327,6 @@ impl<'a, 'b: 'a> DebugList<'a, 'b> {
331327
///
332328
/// Constructed by the `Formatter::debug_map` method.
333329
#[must_use]
334-
#[allow(missing_debug_implementations)]
335330
#[stable(feature = "debug_builders", since = "1.2.0")]
336331
pub struct DebugMap<'a, 'b: 'a> {
337332
fmt: &'a mut fmt::Formatter<'b>,

branches/beta/src/libcore/fmt/mod.rs

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use prelude::v1::*;
1616

17-
use cell::{UnsafeCell, Cell, RefCell, Ref, RefMut, BorrowState};
17+
use cell::{Cell, RefCell, Ref, RefMut, BorrowState};
1818
use marker::PhantomData;
1919
use mem;
2020
use num::flt2dec;
@@ -25,7 +25,6 @@ use str;
2525

2626
#[unstable(feature = "fmt_flags_align", issue = "27726")]
2727
/// Possible alignments returned by `Formatter::align`
28-
#[derive(Debug)]
2928
pub enum Alignment {
3029
/// Indication that contents should be left-aligned.
3130
Left,
@@ -153,7 +152,6 @@ impl<'a, W: Write + ?Sized> Write for &'a mut W {
153152
/// A struct to represent both where to emit formatting strings to and how they
154153
/// should be formatted. A mutable version of this is passed to all formatting
155154
/// traits.
156-
#[allow(missing_debug_implementations)]
157155
#[stable(feature = "rust1", since = "1.0.0")]
158156
pub struct Formatter<'a> {
159157
flags: u32,
@@ -177,7 +175,6 @@ enum Void {}
177175
/// compile time it is ensured that the function and the value have the correct
178176
/// types, and then this struct is used to canonicalize arguments to one type.
179177
#[derive(Copy)]
180-
#[allow(missing_debug_implementations)]
181178
#[unstable(feature = "fmt_internals", reason = "internal to format_args!",
182179
issue = "0")]
183180
#[doc(hidden)]
@@ -1588,9 +1585,7 @@ impl<T: ?Sized> Debug for PhantomData<T> {
15881585
#[stable(feature = "rust1", since = "1.0.0")]
15891586
impl<T: Copy + Debug> Debug for Cell<T> {
15901587
fn fmt(&self, f: &mut Formatter) -> Result {
1591-
f.debug_struct("Cell")
1592-
.field("value", &self.get())
1593-
.finish()
1588+
write!(f, "Cell {{ value: {:?} }}", self.get())
15941589
}
15951590
}
15961591

@@ -1599,15 +1594,9 @@ impl<T: ?Sized + Debug> Debug for RefCell<T> {
15991594
fn fmt(&self, f: &mut Formatter) -> Result {
16001595
match self.borrow_state() {
16011596
BorrowState::Unused | BorrowState::Reading => {
1602-
f.debug_struct("RefCell")
1603-
.field("value", &self.borrow())
1604-
.finish()
1605-
}
1606-
BorrowState::Writing => {
1607-
f.debug_struct("RefCell")
1608-
.field("value", &"<borrowed>")
1609-
.finish()
1597+
write!(f, "RefCell {{ value: {:?} }}", self.borrow())
16101598
}
1599+
BorrowState::Writing => write!(f, "RefCell {{ <borrowed> }}"),
16111600
}
16121601
}
16131602
}
@@ -1626,12 +1615,5 @@ impl<'b, T: ?Sized + Debug> Debug for RefMut<'b, T> {
16261615
}
16271616
}
16281617

1629-
#[stable(feature = "core_impl_debug", since = "1.9.0")]
1630-
impl<T: ?Sized + Debug> Debug for UnsafeCell<T> {
1631-
fn fmt(&self, f: &mut Formatter) -> Result {
1632-
f.pad("UnsafeCell")
1633-
}
1634-
}
1635-
16361618
// If you expected tests to be here, look instead at the run-pass/ifmt.rs test,
16371619
// it's a lot easier than creating all of the rt::Piece structures here.

branches/beta/src/libcore/fmt/rt/v1.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
//!
1414
//! These definitions are similar to their `ct` equivalents, but differ in that
1515
//! these can be statically allocated and are slightly optimized for the runtime
16-
#![allow(missing_debug_implementations)]
1716
1817
#[derive(Copy, Clone)]
1918
pub struct Argument {

branches/beta/src/libcore/hash/mod.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@
7373

7474
use prelude::v1::*;
7575

76-
use fmt;
7776
use marker;
7877
use mem;
7978

@@ -216,13 +215,6 @@ pub trait BuildHasher {
216215
#[stable(since = "1.7.0", feature = "build_hasher")]
217216
pub struct BuildHasherDefault<H>(marker::PhantomData<H>);
218217

219-
#[stable(since = "1.9.0", feature = "core_impl_debug")]
220-
impl<H> fmt::Debug for BuildHasherDefault<H> {
221-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
222-
f.pad("BuildHasherDefault")
223-
}
224-
}
225-
226218
#[stable(since = "1.7.0", feature = "build_hasher")]
227219
impl<H: Default + Hasher> BuildHasher for BuildHasherDefault<H> {
228220
type Hasher = H;

branches/beta/src/libcore/hash/sip.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ use super::Hasher;
3030
/// Although the SipHash algorithm is considered to be generally strong,
3131
/// it is not intended for cryptographic purposes. As such, all
3232
/// cryptographic uses of this implementation are _strongly discouraged_.
33-
#[derive(Debug)]
3433
#[stable(feature = "rust1", since = "1.0.0")]
3534
pub struct SipHasher {
3635
k0: u64,

branches/beta/src/libcore/intrinsics.rs

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,44 +53,53 @@ extern "rust-intrinsic" {
5353
// NB: These intrinsics take raw pointers because they mutate aliased
5454
// memory, which is not valid for either `&` or `&mut`.
5555

56-
#[cfg(all(stage0, not(cargobuild)))]
56+
#[cfg(stage0)]
5757
pub fn atomic_cxchg<T>(dst: *mut T, old: T, src: T) -> T;
58-
#[cfg(all(stage0, not(cargobuild)))]
58+
#[cfg(stage0)]
5959
pub fn atomic_cxchg_acq<T>(dst: *mut T, old: T, src: T) -> T;
60-
#[cfg(all(stage0, not(cargobuild)))]
60+
#[cfg(stage0)]
6161
pub fn atomic_cxchg_rel<T>(dst: *mut T, old: T, src: T) -> T;
62-
#[cfg(all(stage0, not(cargobuild)))]
62+
#[cfg(stage0)]
6363
pub fn atomic_cxchg_acqrel<T>(dst: *mut T, old: T, src: T) -> T;
64-
#[cfg(all(stage0, not(cargobuild)))]
64+
#[cfg(stage0)]
6565
pub fn atomic_cxchg_relaxed<T>(dst: *mut T, old: T, src: T) -> T;
6666

67-
#[cfg(any(not(stage0), cargobuild))]
67+
#[cfg(not(stage0))]
6868
pub fn atomic_cxchg<T>(dst: *mut T, old: T, src: T) -> (T, bool);
69-
#[cfg(any(not(stage0), cargobuild))]
69+
#[cfg(not(stage0))]
7070
pub fn atomic_cxchg_acq<T>(dst: *mut T, old: T, src: T) -> (T, bool);
71-
#[cfg(any(not(stage0), cargobuild))]
71+
#[cfg(not(stage0))]
7272
pub fn atomic_cxchg_rel<T>(dst: *mut T, old: T, src: T) -> (T, bool);
73-
#[cfg(any(not(stage0), cargobuild))]
73+
#[cfg(not(stage0))]
7474
pub fn atomic_cxchg_acqrel<T>(dst: *mut T, old: T, src: T) -> (T, bool);
75-
#[cfg(any(not(stage0), cargobuild))]
75+
#[cfg(not(stage0))]
7676
pub fn atomic_cxchg_relaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
77-
#[cfg(any(not(stage0), cargobuild))]
77+
#[cfg(not(stage0))]
7878
pub fn atomic_cxchg_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
79-
#[cfg(any(not(stage0), cargobuild))]
79+
#[cfg(not(stage0))]
8080
pub fn atomic_cxchg_failacq<T>(dst: *mut T, old: T, src: T) -> (T, bool);
81-
#[cfg(any(not(stage0), cargobuild))]
81+
#[cfg(not(stage0))]
8282
pub fn atomic_cxchg_acq_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
83-
#[cfg(any(not(stage0), cargobuild))]
83+
#[cfg(not(stage0))]
8484
pub fn atomic_cxchg_acqrel_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
8585

86+
#[cfg(not(stage0))]
8687
pub fn atomic_cxchgweak<T>(dst: *mut T, old: T, src: T) -> (T, bool);
88+
#[cfg(not(stage0))]
8789
pub fn atomic_cxchgweak_acq<T>(dst: *mut T, old: T, src: T) -> (T, bool);
90+
#[cfg(not(stage0))]
8891
pub fn atomic_cxchgweak_rel<T>(dst: *mut T, old: T, src: T) -> (T, bool);
92+
#[cfg(not(stage0))]
8993
pub fn atomic_cxchgweak_acqrel<T>(dst: *mut T, old: T, src: T) -> (T, bool);
94+
#[cfg(not(stage0))]
9095
pub fn atomic_cxchgweak_relaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
96+
#[cfg(not(stage0))]
9197
pub fn atomic_cxchgweak_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
98+
#[cfg(not(stage0))]
9299
pub fn atomic_cxchgweak_failacq<T>(dst: *mut T, old: T, src: T) -> (T, bool);
100+
#[cfg(not(stage0))]
93101
pub fn atomic_cxchgweak_acq_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
102+
#[cfg(not(stage0))]
94103
pub fn atomic_cxchgweak_acqrel_failrelaxed<T>(dst: *mut T, old: T, src: T) -> (T, bool);
95104

96105
pub fn atomic_load<T>(src: *const T) -> T;

0 commit comments

Comments
 (0)