diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-06-24 17:51:02 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-24 18:57:01 -0700 |
| commit | cdccecb24f5c467282b73413494343d3848b4e5a (patch) | |
| tree | 45fd08bfce0007e8e32453b94fd3229d1a13fba3 /src | |
| parent | d6a4c431f4ea819ffffed987167319f14e809955 (diff) | |
| download | rust-cdccecb24f5c467282b73413494343d3848b4e5a.tar.gz rust-cdccecb24f5c467282b73413494343d3848b4e5a.zip | |
Test fixes from the rollup
Closes #14482 (std: Bring back half of Add on String) Closes #15026 (librustc: Remove the fallback to `int` from typechecking.) Closes #15119 (Add more description to c_str::unwrap().) Closes #15120 (Add tests for #12470 and #14285) Closes #15122 (Remove the cheat sheet.) Closes #15126 (rustc: Always include the morestack library) Closes #15127 (Improve ambiguous pronoun.) Closes #15130 (Fix #15129) Closes #15131 (Add the Guide, add warning to tutorial.) Closes #15134 (Xfailed tests for hygiene, etc.) Closes #15135 (core: Add stability attributes to Clone) Closes #15136 (Some minor improvements to core::bool) Closes #15137 (std: Add stability attributes to primitive numeric modules) Closes #15141 (Fix grammar in tutorial) Closes #15143 (Remove few FIXMEs) Closes #15145 (Avoid unnecessary temporary on assignments) Closes #15147 (Small improvements for metaprogramming) Closes #15153 (librustc: Check function argument patterns for legality of by-move) Closes #15154 (test: Add a test for regions, traits, and variance.) Closes #15159 (rustc: Don't register syntax crates twice) Closes #13816 (Stabilize version output for rustc and rustdoc)
Diffstat (limited to 'src')
| -rw-r--r-- | src/libstd/num/int_macros.rs | 2 | ||||
| -rw-r--r-- | src/libstd/num/uint_macros.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/repeat_count.rs | 4 | ||||
| -rw-r--r-- | src/test/debuginfo/generic-function.rs | 6 | ||||
| -rw-r--r-- | src/test/debuginfo/generic-functions-nested.rs | 4 | ||||
| -rw-r--r-- | src/test/run-pass/issue-15108.rs | 2 |
6 files changed, 13 insertions, 7 deletions
diff --git a/src/libstd/num/int_macros.rs b/src/libstd/num/int_macros.rs index 1a22ed03a45..9b3c9d29cc7 100644 --- a/src/libstd/num/int_macros.rs +++ b/src/libstd/num/int_macros.rs @@ -59,6 +59,8 @@ impl FromStrRadix for $T { /// # Examples /// /// ``` +/// #![allow(deprecated)] +/// /// std::int::to_str_bytes(123, 10, |v| { /// assert!(v == "123".as_bytes()); /// }); diff --git a/src/libstd/num/uint_macros.rs b/src/libstd/num/uint_macros.rs index 3b456caa099..19e45b292fb 100644 --- a/src/libstd/num/uint_macros.rs +++ b/src/libstd/num/uint_macros.rs @@ -60,6 +60,8 @@ impl FromStrRadix for $T { /// # Examples /// /// ``` +/// #![allow(deprecated)] +/// /// std::uint::to_str_bytes(123, 10, |v| { /// assert!(v == "123".as_bytes()); /// }); diff --git a/src/test/compile-fail/repeat_count.rs b/src/test/compile-fail/repeat_count.rs index 6d8655fd7d4..c62685d0088 100644 --- a/src/test/compile-fail/repeat_count.rs +++ b/src/test/compile-fail/repeat_count.rs @@ -14,9 +14,13 @@ fn main() { let n = 1; let a = [0, ..n]; //~ ERROR expected constant integer for repeat count but found variable let b = [0, ..()]; //~ ERROR expected positive integer for repeat count but found () + //~^ ERROR: expected `uint` but found `()` let c = [0, ..true]; //~ ERROR expected positive integer for repeat count but found boolean + //~^ ERROR: expected `uint` but found `bool` let d = [0, ..0.5]; //~ ERROR expected positive integer for repeat count but found float + //~^ ERROR: expected `uint` but found `<generic float #0>` let e = [0, .."foo"]; //~ ERROR expected positive integer for repeat count but found string + //~^ ERROR: expected `uint` but found `&'static str` let f = [0, ..-4]; //~^ ERROR expected positive integer for repeat count but found negative integer } diff --git a/src/test/debuginfo/generic-function.rs b/src/test/debuginfo/generic-function.rs index 9fe17f9937a..1777c168d9b 100644 --- a/src/test/debuginfo/generic-function.rs +++ b/src/test/debuginfo/generic-function.rs @@ -55,9 +55,9 @@ fn dup_tup<T0: Clone, T1: Clone>(t0: &T0, t1: &T1) -> ((T0, T1), (T1, T0)) { fn main() { - let _ = dup_tup(&1, &2.5); - let _ = dup_tup(&3.5, &4_u16); - let _ = dup_tup(&5, &Struct { a: 6, b: 7.5 }); + let _ = dup_tup(&1i, &2.5f64); + let _ = dup_tup(&3.5f64, &4_u16); + let _ = dup_tup(&5i, &Struct { a: 6, b: 7.5 }); } fn zzz() {()} diff --git a/src/test/debuginfo/generic-functions-nested.rs b/src/test/debuginfo/generic-functions-nested.rs index 1849ca16138..d9b20a84cdd 100644 --- a/src/test/debuginfo/generic-functions-nested.rs +++ b/src/test/debuginfo/generic-functions-nested.rs @@ -52,8 +52,8 @@ fn outer<TA: Clone>(a: TA) { } fn main() { - outer(-1); - outer(-2.5); + outer(-1i); + outer(-2.5f64); } fn zzz() {()} diff --git a/src/test/run-pass/issue-15108.rs b/src/test/run-pass/issue-15108.rs index 736bd6cd3ab..8ae3d072362 100644 --- a/src/test/run-pass/issue-15108.rs +++ b/src/test/run-pass/issue-15108.rs @@ -8,6 +8,4 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// compile-flags:-O - fn main() {} |
