Skip to content

Commit cdccecb

Browse files
committed
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)
1 parent d6a4c43 commit cdccecb

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

src/libstd/num/int_macros.rs

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ impl FromStrRadix for $T {
5959
/// # Examples
6060
///
6161
/// ```
62+
/// #![allow(deprecated)]
63+
///
6264
/// std::int::to_str_bytes(123, 10, |v| {
6365
/// assert!(v == "123".as_bytes());
6466
/// });

src/libstd/num/uint_macros.rs

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ impl FromStrRadix for $T {
6060
/// # Examples
6161
///
6262
/// ```
63+
/// #![allow(deprecated)]
64+
///
6365
/// std::uint::to_str_bytes(123, 10, |v| {
6466
/// assert!(v == "123".as_bytes());
6567
/// });

src/test/compile-fail/repeat_count.rs

+4
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ fn main() {
1414
let n = 1;
1515
let a = [0, ..n]; //~ ERROR expected constant integer for repeat count but found variable
1616
let b = [0, ..()]; //~ ERROR expected positive integer for repeat count but found ()
17+
//~^ ERROR: expected `uint` but found `()`
1718
let c = [0, ..true]; //~ ERROR expected positive integer for repeat count but found boolean
19+
//~^ ERROR: expected `uint` but found `bool`
1820
let d = [0, ..0.5]; //~ ERROR expected positive integer for repeat count but found float
21+
//~^ ERROR: expected `uint` but found `<generic float #0>`
1922
let e = [0, .."foo"]; //~ ERROR expected positive integer for repeat count but found string
23+
//~^ ERROR: expected `uint` but found `&'static str`
2024
let f = [0, ..-4];
2125
//~^ ERROR expected positive integer for repeat count but found negative integer
2226
}

src/test/debuginfo/generic-function.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ fn dup_tup<T0: Clone, T1: Clone>(t0: &T0, t1: &T1) -> ((T0, T1), (T1, T0)) {
5555

5656
fn main() {
5757

58-
let _ = dup_tup(&1, &2.5);
59-
let _ = dup_tup(&3.5, &4_u16);
60-
let _ = dup_tup(&5, &Struct { a: 6, b: 7.5 });
58+
let _ = dup_tup(&1i, &2.5f64);
59+
let _ = dup_tup(&3.5f64, &4_u16);
60+
let _ = dup_tup(&5i, &Struct { a: 6, b: 7.5 });
6161
}
6262

6363
fn zzz() {()}

src/test/debuginfo/generic-functions-nested.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ fn outer<TA: Clone>(a: TA) {
5252
}
5353

5454
fn main() {
55-
outer(-1);
56-
outer(-2.5);
55+
outer(-1i);
56+
outer(-2.5f64);
5757
}
5858

5959
fn zzz() {()}

src/test/run-pass/issue-15108.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// compile-flags:-O
12-
1311
fn main() {}

0 commit comments

Comments
 (0)