Skip to content

Commit 597b3fd

Browse files
committed
auto merge of #8305 : huonw/rust/triage-fixes, r=cmr
The two deletions are because the test cases are very old (still using `class` and modes!), and, as far as I can tell (since they are so old), the areas they test are well tested by other rpass tests.
2 parents 54c8c23 + 1ce5eff commit 597b3fd

6 files changed

+17
-242
lines changed

src/libstd/str.rs

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3304,19 +3304,22 @@ mod tests {
33043304
fn test_add() {
33053305
#[allow(unnecessary_allocation)];
33063306
macro_rules! t (
3307-
($s1:expr, $s2:expr, $e:expr) => {
3308-
assert_eq!($s1 + $s2, $e);
3309-
assert_eq!($s1.to_owned() + $s2, $e);
3310-
assert_eq!($s1.to_managed() + $s2, $e);
3311-
}
3307+
($s1:expr, $s2:expr, $e:expr) => { {
3308+
let s1 = $s1;
3309+
let s2 = $s2;
3310+
let e = $e;
3311+
assert_eq!(s1 + s2, e.to_owned());
3312+
assert_eq!(s1.to_owned() + s2, e.to_owned());
3313+
assert_eq!(s1.to_managed() + s2, e.to_owned());
3314+
} }
33123315
);
33133316
3314-
t!("foo", "bar", ~"foobar");
3315-
t!("foo", @"bar", ~"foobar");
3316-
t!("foo", ~"bar", ~"foobar");
3317-
t!("ศไทย中", "华Việt Nam", ~"ศไทย中华Việt Nam");
3318-
t!("ศไทย中", @"华Việt Nam", ~"ศไทย中华Việt Nam");
3319-
t!("ศไทย中", ~"华Việt Nam", ~"ศไทย中华Việt Nam");
3317+
t!("foo", "bar", "foobar");
3318+
t!("foo", @"bar", "foobar");
3319+
t!("foo", ~"bar", "foobar");
3320+
t!("ศไทย中", "华Việt Nam", "ศไทย中华Việt Nam");
3321+
t!("ศไทย中", @"华Việt Nam", "ศไทย中华Việt Nam");
3322+
t!("ศไทย中", ~"华Việt Nam", "ศไทย中华Việt Nam");
33203323
}
33213324
33223325
#[test]

src/test/run-pass/class-impl-parameterized-trait.rs

Lines changed: 0 additions & 83 deletions
This file was deleted.

src/test/run-pass/class-implements-multiple-traits.rs

Lines changed: 0 additions & 129 deletions
This file was deleted.

src/test/run-pass/coerce-reborrow-imm-vec-arg.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,4 @@ fn sum_imm(y: &[int]) -> int {
1212
sum(y)
1313
}
1414

15-
/* FIXME #7304
16-
fn sum_const(y: &const [int]) -> int {
17-
sum(y)
18-
}
19-
*/
20-
2115
pub fn main() {}
Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/* FIXME #7302
2-
fn foo(v: &const [uint]) -> ~[uint] {
3-
v.to_owned()
4-
}
5-
*/
6-
71
fn bar(v: &mut [uint]) -> ~[uint] {
82
v.to_owned()
93
}
@@ -14,7 +8,6 @@ fn bip(v: &[uint]) -> ~[uint] {
148

159
pub fn main() {
1610
let mut the_vec = ~[1u, 2, 3, 100];
17-
// assert_eq!(the_vec.clone(), foo(the_vec));
1811
assert_eq!(the_vec.clone(), bar(the_vec));
1912
assert_eq!(the_vec.clone(), bip(the_vec));
2013
}

src/test/run-pass/rcvr-borrowed-to-region.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ trait get {
1212
fn get(self) -> int;
1313
}
1414

15-
// FIXME #7302: Note: impl on a slice
15+
// Note: impl on a slice; we're checking that the pointers below
16+
// correctly get borrowed to `&`. (similar to impling for `int`, with
17+
// `&self` instead of `self`.)
1618
impl<'self> get for &'self int {
1719
fn get(self) -> int {
1820
return *self;
@@ -34,11 +36,6 @@ pub fn main() {
3436
info!("y=%d", y);
3537
assert_eq!(y, 6);
3638

37-
let x = ~6;
38-
let y = x.get();
39-
info!("y=%d", y);
40-
assert_eq!(y, 6);
41-
4239
let x = &6;
4340
let y = x.get();
4441
info!("y=%d", y);

0 commit comments

Comments
 (0)