Skip to content

Commit 5ed9982

Browse files
committed
---
yaml --- r: 132991 b: refs/heads/dist-snap c: 6843d8c h: refs/heads/master i: 132989: f63984a 132987: 0f3c6be 132983: 846f4b6 132975: 3171356 132959: 40c1fee 132927: 067d322 132863: d86ac76 v: v3
1 parent 61d7747 commit 5ed9982

File tree

10 files changed

+93
-16
lines changed

10 files changed

+93
-16
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 457a3c991d79b971be07fce75f9d0c12848fb37c
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 68811817f723e57354b0137b1c9bc6b28016ecbc
9+
refs/heads/dist-snap: 6843d8ccd562c5c5d45c0bba570908d5aa765610
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ then
635635
LLVM_VERSION=$($LLVM_CONFIG --version)
636636

637637
case $LLVM_VERSION in
638-
(3.[2-5]*)
638+
(3.[2-6]*)
639639
msg "found ok version of LLVM: $LLVM_VERSION"
640640
;;
641641
(*)

branches/dist-snap/src/libcollections/priority_queue.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,9 @@ impl<'a, T> Iterator<&'a T> for Items<'a, T> {
529529
}
530530

531531
impl<T: Ord> FromIterator<T> for PriorityQueue<T> {
532-
fn from_iter<Iter: Iterator<T>>(iter: Iter) -> PriorityQueue<T> {
533-
let mut q = PriorityQueue::new();
534-
q.extend(iter);
535-
q
532+
fn from_iter<Iter: Iterator<T>>(mut iter: Iter) -> PriorityQueue<T> {
533+
let vec: Vec<T> = iter.collect();
534+
PriorityQueue::from_vec(vec)
536535
}
537536
}
538537

branches/dist-snap/src/liblibc/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,8 +1356,16 @@ pub mod types {
13561356
pub mod c99 {
13571357
pub type c_longlong = i64;
13581358
pub type c_ulonglong = u64;
1359+
1360+
#[cfg(target_arch = "x86")]
13591361
pub type intptr_t = i32;
1362+
#[cfg(target_arch = "x86_64")]
1363+
pub type intptr_t = i64;
1364+
1365+
#[cfg(target_arch = "x86")]
13601366
pub type uintptr_t = u32;
1367+
#[cfg(target_arch = "x86_64")]
1368+
pub type uintptr_t = u64;
13611369
}
13621370

13631371
pub mod posix88 {

branches/dist-snap/src/librustc/middle/borrowck/gather_loans/restrictions.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,19 @@ impl<'a> RestrictionsContext<'a> {
7070
mc::cat_arg(local_id) => {
7171
// R-Variable, locally declared
7272
let lp = Rc::new(LpVar(local_id));
73-
SafeIf(lp.clone(), vec!(lp))
73+
SafeIf(lp.clone(), vec![lp])
7474
}
7575

7676
mc::cat_upvar(upvar_id, _) => {
7777
// R-Variable, captured into closure
7878
let lp = Rc::new(LpUpvar(upvar_id));
79-
SafeIf(lp.clone(), vec!(lp))
79+
SafeIf(lp.clone(), vec![lp])
8080
}
8181

82-
mc::cat_copied_upvar(..) => {
83-
// FIXME(#2152) allow mutation of upvars
84-
Safe
82+
mc::cat_copied_upvar(mc::CopiedUpvar { upvar_id, .. }) => {
83+
// R-Variable, copied/moved into closure
84+
let lp = Rc::new(LpVar(upvar_id));
85+
SafeIf(lp.clone(), vec![lp])
8586
}
8687

8788
mc::cat_downcast(cmt_base) => {

branches/dist-snap/src/libsyntax/parse/mod.rs

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -412,14 +412,21 @@ pub fn str_lit(lit: &str) -> String {
412412
loop {
413413
match chars.next() {
414414
Some((i, c)) => {
415-
let em = error(i);
416415
match c {
417416
'\\' => {
418-
if chars.peek().expect(em.as_slice()).val1() == '\n' {
417+
let ch = chars.peek().unwrap_or_else(|| {
418+
fail!("{}", error(i).as_slice())
419+
}).val1();
420+
421+
if ch == '\n' {
419422
eat(&mut chars);
420-
} else if chars.peek().expect(em.as_slice()).val1() == '\r' {
423+
} else if ch == '\r' {
421424
chars.next();
422-
if chars.peek().expect(em.as_slice()).val1() != '\n' {
425+
let ch = chars.peek().unwrap_or_else(|| {
426+
fail!("{}", error(i).as_slice())
427+
}).val1();
428+
429+
if ch != '\n' {
423430
fail!("lexer accepted bare CR");
424431
}
425432
eat(&mut chars);
@@ -433,7 +440,11 @@ pub fn str_lit(lit: &str) -> String {
433440
}
434441
},
435442
'\r' => {
436-
if chars.peek().expect(em.as_slice()).val1() != '\n' {
443+
let ch = chars.peek().unwrap_or_else(|| {
444+
fail!("{}", error(i).as_slice())
445+
}).val1();
446+
447+
if ch != '\n' {
437448
fail!("lexer accepted bare CR");
438449
}
439450
chars.next();

branches/dist-snap/src/test/compile-fail/cannot-mutate-captured-non-mut-var.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ fn main() {
1212
let x = 1i;
1313
proc() { x = 2; };
1414
//~^ ERROR: cannot assign to immutable captured outer variable in a proc `x`
15+
16+
let s = std::io::stdin();
17+
proc() { s.lines(); };
18+
//~^ ERROR: cannot borrow immutable captured outer variable in a proc `s` as mutable
1519
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
#![forbid(warnings)]
12+
13+
// Pretty printing tests complain about `use std::predule::*`
14+
#![allow(unused_imports)]
15+
16+
// A var moved into a proc, that has a mutable loan path should
17+
// not trigger a misleading unused_mut warning.
18+
19+
pub fn main() {
20+
let mut stdin = std::io::stdin();
21+
spawn(proc() {
22+
let _ = stdin.lines();
23+
});
24+
}

branches/dist-snap/src/test/run-pass/slowparse-bstring.rs

Lines changed: 15 additions & 0 deletions
Large diffs are not rendered by default.

branches/dist-snap/src/test/run-pass/slowparse-string.rs

Lines changed: 15 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)