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

Rolling up PRs in the queue #20677

Merged
merged 68 commits into from
Jan 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
56a5f31
Fixed GDB pretty printer to work on enums correctly
cactorium Jan 5, 2015
d009a76
Fixed GDB pretty printer more
cactorium Jan 5, 2015
3d3670b
Added fix to LLDB formatter
cactorium Jan 5, 2015
22cae7e
Pylinted and slightly better commented
cactorium Jan 5, 2015
537285e
Fix -Z no-analysis
sanxiyn Jan 5, 2015
7e42338
Added two tests for pretty printing optimized enums
cactorium Jan 5, 2015
87eebd1
Fixed tests
cactorium Jan 5, 2015
d338572
Fixed tests
cactorium Jan 5, 2015
351e6b7
Implement TTY::get_winsize for Windows
retep998 Jan 6, 2015
b683e87
Add check to ensure trait bounds are only placed o
jroesch Jan 6, 2015
72e0800
iOS: CString fallout
vhbit Jan 6, 2015
9d0b3c9
rustc: Turn off multiple versions of crate warning
alexcrichton Jan 6, 2015
ec133fe
cleanup: use short AT notation (`Ty::Item` instead of `<Ty as Trait>:…
Jan 6, 2015
6539cb4
auto merge of #20618 : alexcrichton/rust/less-warn, r=brson
bors Jan 6, 2015
f67b81e
Stabilize std::thread
aturon Jan 5, 2015
570bda6
update zsh rust completions
scialex Jan 6, 2015
7de9a73
Stabilize std::error
aturon Jan 6, 2015
68cb170
std: prevent `CreateProcess()` race on Windows
klutzy Jan 6, 2015
134eb0e
Tuning pthread_key_t type
mneumann Jan 6, 2015
2486d93
Fix ICE that @steveklabnik encountered in rust-ice. The problems turn…
nikomatsakis Jan 6, 2015
ea6f65c
auto merge of #20633 : vhbit/rust/ios-cstring, r=brson
bors Jan 6, 2015
25eada1
[breaking change] Revert Entry behaviour to take keys by value.
dylanede Jan 6, 2015
169fbed
std: Revert stability of Entry-based APIs
alexcrichton Jan 6, 2015
abcbe27
syntax/rustc: implement isize/usize
emberian Dec 6, 2014
5037097
Change `std::kinds` to `std::markers`; flatten `std::kinds::marker`
nrc Jan 6, 2015
ba2a77b
stabilisation
nrc Jan 6, 2015
91ba66f
Review changes
nrc Jan 6, 2015
918255e
Impls using the new scheme for slicing
nrc Dec 31, 2014
f7ff37e
Replace full slice notation with index calls
nrc Jan 2, 2015
5a4ca31
test fallout from isize/usize
emberian Dec 6, 2014
e970db3
Remove old slicing hacks and make new slicing work
nrc Jan 3, 2015
77ed497
Tests
nrc Jan 3, 2015
480374a
Only use built-in indexing for uint indexes
nrc Jan 4, 2015
791f545
Pretty print empty structs properly
nrc Jan 4, 2015
2404232
Remove the unneeded Sized bound on TypeId creation
reem Jan 6, 2015
3ed7f06
Fix fallout in libs. For the most part I just tagged impls as `#[old_…
nikomatsakis Jan 5, 2015
2375a79
Implement impl reachability rules. This is a [breaking-change]. Type
nikomatsakis Jan 5, 2015
d913239
Fix fallout in tests.
nikomatsakis Jan 5, 2015
d31105e
Add new tests covering various cases.
nikomatsakis Jan 5, 2015
44440e5
core: split into fmt::Show and fmt::String
seanmonstar Dec 20, 2014
caca9b2
Fallout from stabilization
aturon Jan 6, 2015
0c7f7a5
fallout
nrc Jan 4, 2015
1afe8a4
rollup merge of #20562: nick29581/arrays-3
alexcrichton Jan 6, 2015
5f27b50
rollup merge of #20609: cmr/mem
alexcrichton Jan 6, 2015
9f07d05
markers -> marker
nrc Jan 6, 2015
5c3ddcb
rollup merge of #20481: seanmonstar/fmt-show-string
alexcrichton Jan 6, 2015
e2f97f5
Register new snapshots
alexcrichton Jan 6, 2015
d85c017
Cleanup and followup to PR #17830: parsing changes
pczarn Jan 2, 2015
f358dbf
rollup merge of #20557: cactorium/prettyprinters
alexcrichton Jan 6, 2015
cc20935
rollup merge of #20570: sanxiyn/no-analysis
alexcrichton Jan 6, 2015
6ccfd3f
rollup merge of #20612: retep998/winsize
alexcrichton Jan 6, 2015
0f1bd6f
rollup merge of #20623: jroesch/reject-non-param-bounds
alexcrichton Jan 6, 2015
e0f546a
rollup merge of #20643: scialex/update-zsh
alexcrichton Jan 6, 2015
0b3b957
rollup merge of #20645: nikomatsakis/rustbook-ice
alexcrichton Jan 6, 2015
acc5d79
rollup merge of #20647: aturon/stab-2-error
alexcrichton Jan 6, 2015
ed61bd8
rollup merge of #20652: vhbit/thread-key-type
alexcrichton Jan 6, 2015
e3f047c
rollup merge of #20653: alexcrichton/entry-unstable
alexcrichton Jan 6, 2015
3892dd1
rollup merge of #20593: nikomatsakis/unused-tps-in-impl
alexcrichton Jan 6, 2015
771fe90
rollup merge of #20607: nrc/kinds
alexcrichton Jan 6, 2015
0631b46
rollup merge of #19430: pczarn/interp_tt-cleanup
alexcrichton Jan 6, 2015
36f5d12
rollup merge of #20615: aturon/stab-2-thread
alexcrichton Jan 6, 2015
0393a16
rollup merge of #20650: klutzy/omg-windows-error-mode
alexcrichton Jan 6, 2015
7840499
rollup merge of #20662: reem/unsized-typeid
alexcrichton Jan 6, 2015
34a63d3
rollup merge of #20656: japaric/at-clean
alexcrichton Jan 6, 2015
26cd8ea
rollup merge of #20563: cmr/macro-input-future-proofing
alexcrichton Jan 6, 2015
56a9e2f
Test fixes and rebase conflicts
alexcrichton Jan 6, 2015
24ccb34
Revert "Remove the unneeded Sized bound on TypeId creation"
alexcrichton Jan 7, 2015
a640008
More test fixes
alexcrichton Jan 7, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 9 additions & 4 deletions src/compiletest/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ impl FromStr for Mode {
}
}

impl fmt::Show for Mode {
impl fmt::String for Mode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let msg = match *self {
fmt::String::fmt(match *self {
CompileFail => "compile-fail",
RunFail => "run-fail",
RunPass => "run-pass",
Expand All @@ -54,8 +54,13 @@ impl fmt::Show for Mode {
DebugInfoGdb => "debuginfo-gdb",
DebugInfoLldb => "debuginfo-lldb",
Codegen => "codegen",
};
msg.fmt(f)
}, f)
}
}

impl fmt::Show for Mode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::String::fmt(self, f)
}
}

Expand Down
34 changes: 14 additions & 20 deletions src/compiletest/compiletest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,15 @@
// except according to those terms.

#![crate_type = "bin"]
#![feature(phase, slicing_syntax, globs, unboxed_closures)]
#![feature(slicing_syntax, unboxed_closures)]

#![deny(warnings)]

extern crate test;
extern crate getopts;

#[cfg(stage0)]
#[phase(plugin, link)]
extern crate log;

#[cfg(not(stage0))]
#[macro_use]
extern crate log;

extern crate regex;

use std::os;
Expand Down Expand Up @@ -108,7 +102,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
let matches =
&match getopts::getopts(args_.as_slice(), groups.as_slice()) {
Ok(m) => m,
Err(f) => panic!("{}", f)
Err(f) => panic!("{:?}", f)
};

if matches.opt_present("h") || matches.opt_present("help") {
Expand All @@ -127,7 +121,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
match regex::Regex::new(s) {
Ok(re) => Some(re),
Err(e) => {
println!("failed to parse filter /{}/: {}", s, e);
println!("failed to parse filter /{}/: {:?}", s, e);
panic!()
}
}
Expand Down Expand Up @@ -186,11 +180,11 @@ pub fn parse_config(args: Vec<String> ) -> Config {
pub fn log_config(config: &Config) {
let c = config;
logv(c, format!("configuration:"));
logv(c, format!("compile_lib_path: {}", config.compile_lib_path));
logv(c, format!("run_lib_path: {}", config.run_lib_path));
logv(c, format!("rustc_path: {}", config.rustc_path.display()));
logv(c, format!("src_base: {}", config.src_base.display()));
logv(c, format!("build_base: {}", config.build_base.display()));
logv(c, format!("compile_lib_path: {:?}", config.compile_lib_path));
logv(c, format!("run_lib_path: {:?}", config.run_lib_path));
logv(c, format!("rustc_path: {:?}", config.rustc_path.display()));
logv(c, format!("src_base: {:?}", config.src_base.display()));
logv(c, format!("build_base: {:?}", config.build_base.display()));
logv(c, format!("stage_id: {}", config.stage_id));
logv(c, format!("mode: {}", config.mode));
logv(c, format!("run_ignored: {}", config.run_ignored));
Expand All @@ -206,10 +200,10 @@ pub fn log_config(config: &Config) {
logv(c, format!("jit: {}", config.jit));
logv(c, format!("target: {}", config.target));
logv(c, format!("host: {}", config.host));
logv(c, format!("android-cross-path: {}",
logv(c, format!("android-cross-path: {:?}",
config.android_cross_path.display()));
logv(c, format!("adb_path: {}", config.adb_path));
logv(c, format!("adb_test_dir: {}", config.adb_test_dir));
logv(c, format!("adb_path: {:?}", config.adb_path));
logv(c, format!("adb_test_dir: {:?}", config.adb_test_dir));
logv(c, format!("adb_device_status: {}",
config.adb_device_status));
match config.test_shard {
Expand Down Expand Up @@ -271,7 +265,7 @@ pub fn run_tests(config: &Config) {
Ok(true) => {}
Ok(false) => panic!("Some tests failed"),
Err(e) => {
println!("I/O failure during tests: {}", e);
println!("I/O failure during tests: {:?}", e);
}
}
}
Expand Down Expand Up @@ -299,13 +293,13 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
}

pub fn make_tests(config: &Config) -> Vec<test::TestDescAndFn> {
debug!("making tests from {}",
debug!("making tests from {:?}",
config.src_base.display());
let mut tests = Vec::new();
let dirs = fs::readdir(&config.src_base).unwrap();
for file in dirs.iter() {
let file = file.clone();
debug!("inspecting file {}", file.display());
debug!("inspecting file {:?}", file.display());
if is_test(config, &file) {
let t = make_test(config, &file, || {
match config.mode {
Expand Down
2 changes: 1 addition & 1 deletion src/compiletest/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fn parse_expected(last_nonfollow_error: Option<uint>,
(which, line)
};

debug!("line={} which={} kind={} msg={}", line_num, which, kind, msg);
debug!("line={} which={:?} kind={:?} msg={:?}", line_num, which, kind, msg);
Some((which, ExpectedError { line: line,
kind: kind,
msg: msg, }))
Expand Down
39 changes: 19 additions & 20 deletions src/compiletest/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub fn run_metrics(config: Config, testfile: String, mm: &mut MetricMap) {
print!("\n\n");
}
let testfile = Path::new(testfile);
debug!("running {}", testfile.display());
debug!("running {:?}", testfile.display());
let props = header::load_props(&testfile);
debug!("loaded props");
match config.mode {
Expand Down Expand Up @@ -141,7 +141,7 @@ fn check_correct_failure_status(proc_res: &ProcRes) {
static RUST_ERR: int = 101;
if !proc_res.status.matches_exit_status(RUST_ERR) {
fatal_proc_rec(
format!("failure produced the wrong error: {}",
format!("failure produced the wrong error: {:?}",
proc_res.status).as_slice(),
proc_res);
}
Expand Down Expand Up @@ -410,7 +410,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
],
vec!(("".to_string(), "".to_string())),
Some("".to_string()))
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
.expect(format!("failed to exec `{:?}`", config.adb_path).as_slice());

procsrv::run("",
config.adb_path.as_slice(),
Expand All @@ -422,7 +422,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
],
vec!(("".to_string(), "".to_string())),
Some("".to_string()))
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
.expect(format!("failed to exec `{:?}`", config.adb_path).as_slice());

let adb_arg = format!("export LD_LIBRARY_PATH={}; \
gdbserver :5039 {}/{}",
Expand All @@ -443,11 +443,11 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
vec!(("".to_string(),
"".to_string())),
Some("".to_string()))
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());
.expect(format!("failed to exec `{:?}`", config.adb_path).as_slice());
loop {
//waiting 1 second for gdbserver start
timer::sleep(Duration::milliseconds(1000));
let result = Thread::spawn(move || {
let result = Thread::scoped(move || {
tcp::TcpStream::connect("127.0.0.1:5039").unwrap();
}).join();
if result.is_err() {
Expand Down Expand Up @@ -481,7 +481,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
debugger_opts.as_slice(),
vec!(("".to_string(), "".to_string())),
None)
.expect(format!("failed to exec `{}`", gdb_path).as_slice());
.expect(format!("failed to exec `{:?}`", gdb_path).as_slice());
let cmdline = {
let cmdline = make_cmdline("",
"arm-linux-androideabi-gdb",
Expand Down Expand Up @@ -539,18 +539,17 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
script_str.push_str("set print pretty off\n");

// Add the pretty printer directory to GDB's source-file search path
script_str.push_str(format!("directory {}\n", rust_pp_module_abs_path)[]);
script_str.push_str(&format!("directory {}\n", rust_pp_module_abs_path)[]);

// Load the target executable
script_str.push_str(format!("file {}\n",
exe_file.as_str().unwrap().replace("\\", "\\\\"))
.as_slice());
script_str.push_str(&format!("file {}\n",
exe_file.as_str().unwrap().replace("\\", "\\\\"))[]);

// Add line breakpoints
for line in breakpoint_lines.iter() {
script_str.push_str(format!("break '{}':{}\n",
testfile.filename_display(),
*line)[]);
script_str.push_str(&format!("break '{:?}':{}\n",
testfile.filename_display(),
*line)[]);
}

script_str.push_str(cmds.as_slice());
Expand Down Expand Up @@ -676,7 +675,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
.unwrap()
.to_string();

script_str.push_str(format!("command script import {}\n", rust_pp_module_abs_path[])[]);
script_str.push_str(&format!("command script import {}\n", &rust_pp_module_abs_path[])[]);
script_str.push_str("type summary add --no-value ");
script_str.push_str("--python-function lldb_rust_formatters.print_val ");
script_str.push_str("-x \".*\" --category Rust\n");
Expand Down Expand Up @@ -889,7 +888,7 @@ fn check_error_patterns(props: &TestProps,
output_to_check: &str,
proc_res: &ProcRes) {
if props.error_patterns.is_empty() {
fatal(format!("no error pattern specified in {}",
fatal(format!("no error pattern specified in {:?}",
testfile.display()).as_slice());
}
let mut next_err_idx = 0u;
Expand All @@ -910,7 +909,7 @@ fn check_error_patterns(props: &TestProps,
if done { return; }

let missing_patterns =
props.error_patterns[next_err_idx..];
props.error_patterns.index(&(next_err_idx..));
if missing_patterns.len() == 1u {
fatal_proc_rec(format!("error pattern '{}' not found!",
missing_patterns[0]).as_slice(),
Expand Down Expand Up @@ -955,7 +954,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
}

let prefixes = expected_errors.iter().map(|ee| {
format!("{}:{}:", testfile.display(), ee.line)
format!("{:?}:{}:", testfile.display(), ee.line)
}).collect::<Vec<String> >();

#[cfg(windows)]
Expand Down Expand Up @@ -1191,7 +1190,7 @@ fn compose_and_run_compiler(
None);
if !auxres.status.success() {
fatal_proc_rec(
format!("auxiliary build of {} failed to compile: ",
format!("auxiliary build of {:?} failed to compile: ",
abs_ab.display()).as_slice(),
&auxres);
}
Expand Down Expand Up @@ -1601,7 +1600,7 @@ fn _arm_push_aux_shared_library(config: &Config, testfile: &Path) {
.expect(format!("failed to exec `{}`", config.adb_path).as_slice());

if config.verbose {
println!("push ({}) {} {} {}",
println!("push ({}) {:?} {} {}",
config.target, file.display(),
copy_result.out, copy_result.err);
}
Expand Down
4 changes: 2 additions & 2 deletions src/doc/guide-error-handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ fn parse_version(header: &[u8]) -> Result<Version, ParseError> {
let version = parse_version(&[1, 2, 3, 4]);
match version {
Ok(v) => {
println!("working with version: {}", v);
println!("working with version: {:?}", v);
}
Err(e) => {
println!("error parsing header: {}", e);
println!("error parsing header: {:?}", e);
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions src/doc/guide-macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ the pattern in the above code:
# let input_1 = T::SpecialA(0);
# let input_2 = T::SpecialA(0);
macro_rules! early_return {
($inp:expr $sp:path) => ( // invoke it like `(input_5 SpecialE)`
($inp:expr, $sp:path) => ( // invoke it like `(input_5 SpecialE)`
match $inp {
$sp(x) => { return x; }
_ => {}
}
);
}
// ...
early_return!(input_1 T::SpecialA);
early_return!(input_1, T::SpecialA);
// ...
early_return!(input_2 T::SpecialB);
early_return!(input_2, T::SpecialB);
# return 0;
# }
# fn main() {}
Expand Down
2 changes: 1 addition & 1 deletion src/doc/guide-pointers.md
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ enum List<T> {

fn main() {
let list: List<int> = List::Cons(1, box List::Cons(2, box List::Cons(3, box List::Nil)));
println!("{}", list);
println!("{:?}", list);
}
```

Expand Down
4 changes: 2 additions & 2 deletions src/doc/guide-unsafe.md
Original file line number Diff line number Diff line change
Expand Up @@ -703,10 +703,10 @@ Other features provided by lang items include:
`deref`, and `add` respectively.
- stack unwinding and general failure; the `eh_personality`, `fail`
and `fail_bounds_checks` lang items.
- the traits in `std::kinds` used to indicate types that satisfy
- the traits in `std::markers` used to indicate types of
various kinds; lang items `send`, `sync` and `copy`.
- the marker types and variance indicators found in
`std::kinds::markers`; lang items `covariant_type`,
`std::markers`; lang items `covariant_type`,
`contravariant_lifetime`, `no_sync_bound`, etc.

Lang items are loaded lazily by the compiler; e.g. if one never uses
Expand Down
9 changes: 4 additions & 5 deletions src/doc/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ fn main() {
for _ in range(0u, 10u) {
Thread::spawn(move || {
println!("Hello, world!");
}).detach();
});
}
}
```
Expand All @@ -405,8 +405,7 @@ This program creates ten threads, who all print `Hello, world!`. The
double bars `||`. (The `move` keyword indicates that the closure takes
ownership of any data it uses; we'll have more on the significance of
this shortly.) This closure is executed in a new thread created by
`spawn`. The `detach` method means that the child thread is allowed to
outlive its parent.
`spawn`.

One common form of problem in concurrent programs is a 'data race.'
This occurs when two different threads attempt to access the same
Expand All @@ -429,7 +428,7 @@ fn main() {
for i in range(0u, 3u) {
Thread::spawn(move || {
for j in range(0, 3) { numbers[j] += 1 }
}).detach();
});
}
}
```
Expand Down Expand Up @@ -488,7 +487,7 @@ fn main() {
(*array)[i] += 1;

println!("numbers[{}] is {}", i, (*array)[i]);
}).detach();
});
}
}
```
Expand Down
7 changes: 3 additions & 4 deletions src/doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -690,10 +690,9 @@ balanced, but they are otherwise not special.

In the matcher, `$` _name_ `:` _designator_ matches the nonterminal in the Rust
syntax named by _designator_. Valid designators are `item`, `block`, `stmt`,
`pat`, `expr`, `ty` (type), `ident`, `path`, `matchers` (lhs of the `=>` in
macro rules), `tt` (rhs of the `=>` in macro rules). In the transcriber, the
designator is already known, and so only the name of a matched nonterminal
comes after the dollar sign.
`pat`, `expr`, `ty` (type), `ident`, `path`, `tt` (either side of the `=>`
in macro rules). In the transcriber, the designator is already known, and so
only the name of a matched nonterminal comes after the dollar sign.

In both the matcher and transcriber, the Kleene star-like operator indicates
repetition. The Kleene star operator consists of `$` and parens, optionally
Expand Down
Loading