Skip to content

Commit

Permalink
Test fixes and rebase conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Dec 21, 2014
1 parent dbeef0e commit eaf2b72
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 12 deletions.
15 changes: 8 additions & 7 deletions src/liballoc/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,37 @@
//!
//! ```
//! use std::sync::Arc;
//! use std::thread::Thread;
//!
//! let five = Arc::new(5i);
//!
//! for i in range(0u, 10) {
//! let five = five.clone();
//!
//! spawn(move || {
//! Thread::spawn(move || {
//! println!("{}", five);
//! });
//! }).detach();
//! }
//! ```
//!
//! Sharing mutable data safely between tasks with a `Mutex`:
//!
//! ```
//! use std::sync::Arc;
//! use std::sync::Mutex;
//! use std::sync::{Arc, Mutex};
//! use std::thread::Thread;
//!
//! let five = Arc::new(Mutex::new(5i));
//!
//! for _ in range(0u, 10) {
//! let five = five.clone();
//!
//! spawn(move || {
//! Thread::spawn(move || {
//! let mut number = five.lock();
//!
//! number += 1;
//! *number += 1;
//!
//! println!("{}", *number); // prints 6
//! });
//! }).detach();
//! }
//! ```

Expand Down
1 change: 1 addition & 0 deletions src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ use core::cmp::max;
use core::default::Default;
use core::fmt;
use core::hash::{mod, Hash};
use core::iter::repeat;
use core::kinds::marker::{ContravariantLifetime, InvariantType};
use core::mem;
use core::num::{Int, UnsignedInt};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl<'v> Visitor<'v> for Annotator {
}

fn visit_foreign_item(&mut self, i: &ast::ForeignItem) {
self.annotate(i.id, &i.attrs, |_| {});
self.annotate(i.id, true, &i.attrs, |_| {});
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/librustc/util/ppaux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,8 @@ pub fn parameterized<'tcx>(cx: &ctxt<'tcx>,
base,
if strs[0].starts_with("(") && strs[0].ends_with(",)") {
strs[0][1 .. strs[0].len() - 2] // Remove '(' and ',)'
} else if strs[0].starts_with("(") && strs[0].ends_with(")") {
strs[0][1 .. strs[0].len() - 1] // Remove '(' and ')'
} else {
strs[0][]
},
Expand Down
1 change: 0 additions & 1 deletion src/libstd/collections/hash/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1473,7 +1473,6 @@ mod test_map {

use super::HashMap;
use super::Entry::{Occupied, Vacant};
use cmp::Equiv;
use hash;
use iter::{range_inclusive, range_step_inclusive};
use cell::RefCell;
Expand Down
2 changes: 1 addition & 1 deletion src/snapshots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ S 2014-12-20 8443b09
linux-i386 3daf531aed03f5769402f2fef852377e2838db98
linux-x86_64 4f3c8b092dd4fe159d6f25a217cf62e0e899b365
macos-i386 2a3e647b9c400505bd49cfe56091e866c83574ca
macos-x86_64 78f952a3e77a9921a23c957bb133131017b57324
macos-x86_64 5e730efc34d79a33f464a87686c10eace0760a2e
winnt-i386 8ea056043de82096d5ce5abc98c8c74ebac7e77d
winnt-x86_64 9804100dafae9b64a76e0ea7e1be157719dae151

Expand Down
4 changes: 2 additions & 2 deletions src/test/compile-fail/issue-13359.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ fn bar(_s: u32) { }

fn main() {
foo(1*(1 as int));
//~^ ERROR: mismatched types: expected `i16`, found `int` (expected `i16`, found `int`)
//~^ ERROR: mismatched types: expected `i16`, found `int` (expected i16, found int)

bar(1*(1 as uint));
//~^ ERROR: mismatched types: expected `u32`, found `uint` (expected `u32`, found `uint`)
//~^ ERROR: mismatched types: expected `u32`, found `uint` (expected u32, found uint)
}

4 comments on commit eaf2b72

@bors
Copy link
Contributor

@bors bors commented on eaf2b72 Dec 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at alexcrichton@eaf2b72

@bors
Copy link
Contributor

@bors bors commented on eaf2b72 Dec 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging alexcrichton/rust/rollup = eaf2b72 into auto

@bors
Copy link
Contributor

@bors bors commented on eaf2b72 Dec 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

status: {"merge_sha": "8965272f90a47d8c03a56d5b8ed4312244c7d2bd"}

@bors
Copy link
Contributor

@bors bors commented on eaf2b72 Dec 21, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alexcrichton/rust/rollup = eaf2b72 merged ok, testing candidate = 8965272f

Please sign in to comment.