Skip to content

Commit 843c5f1

Browse files
committed
---
yaml --- r: 228331 b: refs/heads/try c: 3f636c3 h: refs/heads/master i: 228329: e012456 228327: ba57893 v: v3
1 parent 1226fb6 commit 843c5f1

File tree

19 files changed

+120
-319
lines changed

19 files changed

+120
-319
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: aca2057ed5fb7af3f8905b2bc01f72fa001c35c8
33
refs/heads/snap-stage3: 1af31d4974e33027a68126fa5a5a3c2c6491824f
4-
refs/heads/try: 9ff2d19c45f8e110bdcded982c6612ff825e17cb
4+
refs/heads/try: 3f636c3ccbecffbaa1d6a90753f8296112ada5fd
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ Santiago Rodriguez <[email protected]>
958958
Saurabh Anand <[email protected]>
959959
Scott Jenkins <[email protected]>
960960
Scott Lawrence <[email protected]>
961-
Scott Olson <scott@scott-olson.org>
961+
Scott Olson <scott@solson.me>
962962
Sean Bowe <[email protected]>
963963
Sean Chalmers <[email protected]>
964964
Sean Collins <[email protected]>

branches/try/src/doc/trpl/dining-philosophers.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ look at `main()` again:
151151
# struct Philosopher {
152152
# name: String,
153153
# }
154-
#
154+
#
155155
# impl Philosopher {
156156
# fn new(name: &str) -> Philosopher {
157157
# Philosopher {
158158
# name: name.to_string(),
159159
# }
160160
# }
161161
# }
162-
#
162+
#
163163
fn main() {
164164
let p1 = Philosopher::new("Judith Butler");
165165
let p2 = Philosopher::new("Gilles Deleuze");
@@ -197,15 +197,15 @@ a method, and then loop through all the philosophers, calling it:
197197
```rust
198198
struct Philosopher {
199199
name: String,
200-
}
200+
}
201201

202-
impl Philosopher {
202+
impl Philosopher {
203203
fn new(name: &str) -> Philosopher {
204204
Philosopher {
205205
name: name.to_string(),
206206
}
207207
}
208-
208+
209209
fn eat(&self) {
210210
println!("{} is done eating.", self.name);
211211
}
@@ -267,15 +267,15 @@ use std::thread;
267267

268268
struct Philosopher {
269269
name: String,
270-
}
270+
}
271271

272-
impl Philosopher {
272+
impl Philosopher {
273273
fn new(name: &str) -> Philosopher {
274274
Philosopher {
275275
name: name.to_string(),
276276
}
277277
}
278-
278+
279279
fn eat(&self) {
280280
println!("{} is eating.", self.name);
281281

@@ -348,9 +348,9 @@ use std::thread;
348348

349349
struct Philosopher {
350350
name: String,
351-
}
351+
}
352352

353-
impl Philosopher {
353+
impl Philosopher {
354354
fn new(name: &str) -> Philosopher {
355355
Philosopher {
356356
name: name.to_string(),
@@ -401,7 +401,7 @@ let handles: Vec<_> = philosophers.into_iter().map(|p| {
401401
While this is only five lines, they’re a dense five. Let’s break it down.
402402

403403
```rust,ignore
404-
let handles: Vec<_> =
404+
let handles: Vec<_> =
405405
```
406406

407407
We introduce a new binding, called `handles`. We’ve given it this name because
@@ -460,15 +460,15 @@ If you run this program, you’ll see that the philosophers eat out of order!
460460
We have multi-threading!
461461

462462
```text
463-
Judith Butler is eating.
464463
Gilles Deleuze is eating.
465-
Karl Marx is eating.
464+
Gilles Deleuze is done eating.
466465
Emma Goldman is eating.
466+
Emma Goldman is done eating.
467467
Michel Foucault is eating.
468+
Judith Butler is eating.
468469
Judith Butler is done eating.
469-
Gilles Deleuze is done eating.
470+
Karl Marx is eating.
470471
Karl Marx is done eating.
471-
Emma Goldman is done eating.
472472
Michel Foucault is done eating.
473473
```
474474

branches/try/src/liballoc/boxed.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ use core::raw::{TraitObject};
7171
/// The following two examples are equivalent:
7272
///
7373
/// ```
74-
/// # #![feature(box_heap)]
74+
/// #![feature(box_heap)]
7575
/// #![feature(box_syntax)]
7676
/// use std::boxed::HEAP;
7777
///
@@ -162,7 +162,7 @@ impl<T : ?Sized> Box<T> {
162162
///
163163
/// # Examples
164164
/// ```
165-
/// # #![feature(box_raw)]
165+
/// #![feature(box_raw)]
166166
/// use std::boxed;
167167
///
168168
/// let seventeen = Box::new(17u32);

branches/try/src/libcore/num/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,15 +459,15 @@ macro_rules! int_impl {
459459
}
460460
}
461461

462-
/// Wrapping (modular) division. Computes `self / other`,
462+
/// Wrapping (modular) division. Computes `floor(self / other)`,
463463
/// wrapping around at the boundary of the type.
464464
///
465465
/// The only case where such wrapping can occur is when one
466466
/// divides `MIN / -1` on a signed type (where `MIN` is the
467467
/// negative minimal value for the type); this is equivalent
468468
/// to `-MIN`, a positive value that is too large to represent
469469
/// in the type. In such a case, this function returns `MIN`
470-
/// itself.
470+
/// itself..
471471
#[stable(feature = "num_wrapping", since = "1.2.0")]
472472
#[inline(always)]
473473
pub fn wrapping_div(self, rhs: Self) -> Self {
@@ -1031,15 +1031,15 @@ macro_rules! uint_impl {
10311031
}
10321032
}
10331033

1034-
/// Wrapping (modular) division. Computes `self / other`,
1034+
/// Wrapping (modular) division. Computes `floor(self / other)`,
10351035
/// wrapping around at the boundary of the type.
10361036
///
10371037
/// The only case where such wrapping can occur is when one
10381038
/// divides `MIN / -1` on a signed type (where `MIN` is the
10391039
/// negative minimal value for the type); this is equivalent
10401040
/// to `-MIN`, a positive value that is too large to represent
10411041
/// in the type. In such a case, this function returns `MIN`
1042-
/// itself.
1042+
/// itself..
10431043
#[stable(feature = "num_wrapping", since = "1.2.0")]
10441044
#[inline(always)]
10451045
pub fn wrapping_div(self, rhs: Self) -> Self {

branches/try/src/libcore/ops.rs

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,8 @@ pub trait Div<RHS=Self> {
351351
fn div(self, rhs: RHS) -> Self::Output;
352352
}
353353

354-
macro_rules! div_impl_integer {
354+
macro_rules! div_impl {
355355
($($t:ty)*) => ($(
356-
/// This operation rounds towards zero, truncating any
357-
/// fractional part of the exact result.
358356
#[stable(feature = "rust1", since = "1.0.0")]
359357
impl Div for $t {
360358
type Output = $t;
@@ -367,23 +365,7 @@ macro_rules! div_impl_integer {
367365
)*)
368366
}
369367

370-
div_impl_integer! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 }
371-
372-
macro_rules! div_impl_float {
373-
($($t:ty)*) => ($(
374-
#[stable(feature = "rust1", since = "1.0.0")]
375-
impl Div for $t {
376-
type Output = $t;
377-
378-
#[inline]
379-
fn div(self, other: $t) -> $t { self / other }
380-
}
381-
382-
forward_ref_binop! { impl Div, div for $t, $t }
383-
)*)
384-
}
385-
386-
div_impl_float! { f32 f64 }
368+
div_impl! { usize u8 u16 u32 u64 isize i8 i16 i32 i64 f32 f64 }
387369

388370
/// The `Rem` trait is used to specify the functionality of `%`.
389371
///
@@ -425,8 +407,6 @@ pub trait Rem<RHS=Self> {
425407

426408
macro_rules! rem_impl {
427409
($($t:ty)*) => ($(
428-
/// This operation satisfies `n % d == n - (n / d) * d`. The
429-
/// result has the same sign as the left operand.
430410
#[stable(feature = "rust1", since = "1.0.0")]
431411
impl Rem for $t {
432412
type Output = $t;

branches/try/src/librustc/middle/fast_reject.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,8 @@ pub fn simplify_type(tcx: &ty::ctxt,
7171
}
7272
ty::TyBox(_) => {
7373
// treat like we would treat `Box`
74-
match tcx.lang_items.require_owned_box() {
75-
Ok(def_id) => Some(StructSimplifiedType(def_id)),
76-
Err(msg) => tcx.sess.fatal(&msg),
77-
}
74+
let def_id = tcx.lang_items.owned_box().unwrap();
75+
Some(StructSimplifiedType(def_id))
7876
}
7977
ty::TyClosure(def_id, _) => {
8078
Some(ClosureSimplifiedType(def_id))

branches/try/src/librustc/middle/lang_items.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ impl LanguageItems {
9090
}
9191
}
9292

93-
pub fn require_owned_box(&self) -> Result<ast::DefId, String> {
94-
self.require(OwnedBoxLangItem)
95-
}
96-
9793
pub fn from_builtin_kind(&self, bound: ty::BuiltinBound)
9894
-> Result<ast::DefId, String>
9995
{

branches/try/src/librustc_trans/trans/_match.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,8 +1384,7 @@ impl<'tcx> euv::Delegate<'tcx> for ReassignmentChecker {
13841384
match base_cmt.cat {
13851385
mc::cat_upvar(mc::Upvar { id: ty::UpvarId { var_id: vid, .. }, .. }) |
13861386
mc::cat_local(vid) => {
1387-
self.reassigned |= self.node == vid &&
1388-
(self.field.is_none() || Some(field) == self.field)
1387+
self.reassigned |= self.node == vid && Some(field) == self.field
13891388
},
13901389
_ => {}
13911390
}

branches/try/src/librustc_typeck/coherence/orphan.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,7 @@ impl<'cx, 'tcx> OrphanChecker<'cx, 'tcx> {
7777
self.check_def_id(item, data.principal_def_id());
7878
}
7979
ty::TyBox(..) => {
80-
match self.tcx.lang_items.require_owned_box() {
81-
Ok(trait_id) => self.check_def_id(item, trait_id),
82-
Err(msg) => self.tcx.sess.span_fatal(item.span, &msg),
83-
}
80+
self.check_def_id(item, self.tcx.lang_items.owned_box().unwrap());
8481
}
8582
ty::TyChar => {
8683
self.check_primitive_impl(def_id,

branches/try/src/libstd/thread/local.rs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ mod imp {
275275

276276
use cell::{Cell, UnsafeCell};
277277
use intrinsics;
278-
use ptr;
279278

280279
pub struct Key<T> {
281280
inner: UnsafeCell<Option<T>>,
@@ -328,6 +327,7 @@ mod imp {
328327
#[cfg(target_os = "linux")]
329328
unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) {
330329
use mem;
330+
use ptr;
331331
use libc;
332332
use sys_common::thread_local as os;
333333

@@ -394,24 +394,7 @@ mod imp {
394394
// destructor as running for this thread so calls to `get` will return
395395
// `None`.
396396
(*ptr).dtor_running.set(true);
397-
398-
// The OSX implementation of TLS apparently had an odd aspect to it
399-
// where the pointer we have may be overwritten while this destructor
400-
// is running. Specifically if a TLS destructor re-accesses TLS it may
401-
// trigger a re-initialization of all TLS variables, paving over at
402-
// least some destroyed ones with initial values.
403-
//
404-
// This means that if we drop a TLS value in place on OSX that we could
405-
// revert the value to its original state halfway through the
406-
// destructor, which would be bad!
407-
//
408-
// Hence, we use `ptr::read` on OSX (to move to a "safe" location)
409-
// instead of drop_in_place.
410-
if cfg!(target_os = "macos") {
411-
ptr::read((*ptr).inner.get());
412-
} else {
413-
intrinsics::drop_in_place((*ptr).inner.get());
414-
}
397+
intrinsics::drop_in_place((*ptr).inner.get());
415398
}
416399
}
417400

branches/try/src/libsyntax/ext/tt/macro_rules.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ fn is_in_follow(_: &ExtCtxt, tok: &Token, frag: &str) -> Result<bool, String> {
501501
},
502502
"path" | "ty" => {
503503
match *tok {
504-
Comma | FatArrow | Colon | Eq | Gt | Semi => Ok(true),
504+
Comma | FatArrow | Colon | Eq | Gt => Ok(true),
505505
Ident(i, _) if i.as_str() == "as" => Ok(true),
506506
_ => Ok(false)
507507
}

0 commit comments

Comments
 (0)