Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to rust 2015-03-22 #1440

Merged
merged 3 commits into from
Mar 23, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update to rust 2015-03-22
  • Loading branch information
tamird committed Mar 23, 2015
commit 1ced1dc8dd9c3a6dbe75055092691c15745c3402
83 changes: 43 additions & 40 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ define DIST_TARGET
ifdef CFG_ENABLE_OPTIMIZE
TARGET_$(1) = $$(TARGET_ROOT)/$(1)/release
else
TARGET_$(1) = $$(TARGET_ROOT)/$(1)
TARGET_$(1) = $$(TARGET_ROOT)/$(1)/debug
endif
DISTDIR_$(1) = $$(TARGET_$(1))/dist
IMGDIR_$(1) = $$(DISTDIR_$(1))/$$(PKG_NAME)-$(1)-image
Expand Down
4 changes: 2 additions & 2 deletions src/bin/cargo.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(core, io, std_misc, exit_status)]
#![feature(core, exit_status, fs_ext)]

extern crate "git2-curl" as git2_curl;
extern crate "rustc-serialize" as rustc_serialize;
Expand Down Expand Up @@ -191,7 +191,7 @@ fn execute_subcommand(cmd: &str, args: &[String], shell: &mut MultiShell) {
}
}
}
Err(ref e) if e.kind() == io::ErrorKind::FileNotFound => {
Err(ref e) if e.kind() == io::ErrorKind::NotFound => {
handle_error(CliError::new("No such subcommand", 127), shell)
}
Err(err) => {
Expand Down
4 changes: 2 additions & 2 deletions src/cargo/util/lev_distance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub fn lev_distance(me: &str, t: &str) -> usize {
if me.is_empty() { return t.chars().count(); }
if t.is_empty() { return me.chars().count(); }

let mut dcol = range(0, t.len() + 1).collect::<Vec<_>>();
let mut dcol = (0..t.len() + 1).collect::<Vec<_>>();
let mut t_last = 0;

for (i, sc) in me.chars().enumerate() {
Expand Down Expand Up @@ -45,7 +45,7 @@ pub fn lev_distance(me: &str, t: &str) -> usize {
fn test_lev_distance() {
use std::char::{ from_u32, MAX };
// Test bytelength agnosticity
for c in range(0u32, MAX as u32)
for c in (0u32..MAX as u32)
.filter_map(|i| from_u32(i))
.map(|i| i.to_string()) {
assert_eq!(lev_distance(&c, &c), 0);
Expand Down
2 changes: 1 addition & 1 deletion src/rustversion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2015-03-14
2015-03-22
8 changes: 8 additions & 0 deletions src/snapshots.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2015-03-17
linux-i386 96a64fa9b4b6cc0cddaa90ecde4e08254c9025d5
linux-x86_64 354bb5b11b1f19e270ebc0553db1ddc560999bdb
macos-i386 d1b69ef765bc450a3758b8abdb0909df7893058b
macos-x86_64 a2328a82e073c230cd88dcfac96bdc784a999200
winnt-i386 fb6e346d59bda47ed87e36800e8bfe210cf01297
winnt-x86_64 4ef3d1ce315df8b27bd842fb66b8e2b03ce99a08

2015-02-26
linux-i386 2a28b604d09b4a76a54a05d91f7f158692427b3a
linux-x86_64 7367f4aca86d38e209ef7236b00175df036c03e2
Expand Down
4 changes: 2 additions & 2 deletions tests/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ pub fn cargo_dir() -> PathBuf {
*/

#[derive(Clone)]
struct Execs {
pub struct Execs {
expect_stdout: Option<String>,
expect_stdin: Option<String>,
expect_stderr: Option<String>,
Expand Down Expand Up @@ -436,7 +436,7 @@ pub fn execs() -> Execs {
}

#[derive(Clone)]
struct ShellWrites {
pub struct ShellWrites {
expected: String
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test_cargo_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ test!(cargo_bench_twice {

p.cargo_process("build");

for _ in range(0, 2) {
for _ in 0..2 {
assert_that(p.cargo("bench"),
execs().with_status(0));
}
Expand Down
6 changes: 3 additions & 3 deletions tests/test_cargo_build_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn setup() {
// Test that HTTP auth is offered from `credential.helper`
test!(http_auth_offered {
let a = TcpListener::bind("127.0.0.1:0").unwrap();
let addr = a.socket_addr().unwrap();
let addr = a.local_addr().unwrap();

fn headers(rdr: &mut BufRead) -> HashSet<String> {
let valid = ["GET", "Authorization", "Accept", "User-Agent"];
Expand Down Expand Up @@ -116,7 +116,7 @@ Caused by:
// Boy, sure would be nice to have a TLS implementation in rust!
test!(https_something_happens {
let a = TcpListener::bind("127.0.0.1:0").unwrap();
let addr = a.socket_addr().unwrap();
let addr = a.local_addr().unwrap();
let t = thread::spawn(move|| {
drop(a.accept().unwrap());
});
Expand Down Expand Up @@ -163,7 +163,7 @@ Caused by:
// Boy, sure would be nice to have an SSH implementation in rust!
test!(ssh_something_happens {
let a = TcpListener::bind("127.0.0.1:0").unwrap();
let addr = a.socket_addr().unwrap();
let addr = a.local_addr().unwrap();
let t = thread::spawn(move|| {
drop(a.accept().unwrap());
});
Expand Down
1 change: 1 addition & 0 deletions tests/test_cargo_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1298,6 +1298,7 @@ test!(rebuild_preserves_out_dir {
.file("build.rs", r#"
use std::env;
use std::old_io::File;
use std::old_path::{Path, GenericPath};

fn main() {
let path = Path::new(env::var("OUT_DIR").unwrap()).join("foo");
Expand Down
Loading