Skip to content

Commit 872ce47

Browse files
committed
Fallout: tests. As tests frequently elide things, lots of changes
here. Some of this may have been poorly rebased, though I tried to be careful and preserve the spirit of the test.
1 parent ef42c2b commit 872ce47

File tree

306 files changed

+915
-580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+915
-580
lines changed

src/libcoretest/mem.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn test_transmute_copy() {
9292

9393
#[test]
9494
fn test_transmute() {
95-
trait Foo {}
95+
trait Foo { fn dummy(&self) { } }
9696
impl Foo for int {}
9797

9898
let a = box 100 as Box<Foo>;

src/test/auxiliary/coherence-orphan-lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
pub trait TheTrait<T> {
11+
pub trait TheTrait<T> : ::std::marker::PhantomFn<T> {
1212
fn the_fn(&self);
1313
}
1414

src/test/auxiliary/default_type_params_xc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ pub struct Heap;
1212

1313
pub struct FakeHeap;
1414

15-
pub struct FakeVec<T, A = FakeHeap>;
15+
pub struct FakeVec<T, A = FakeHeap> { pub f: Option<(T,A)> }
16+

src/test/auxiliary/inner_static.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
pub struct A<T>;
12-
pub struct B<T>;
11+
pub struct A<T> { pub v: T }
12+
pub struct B<T> { pub v: T }
1313

1414
pub mod test {
15-
pub struct A<T>;
15+
pub struct A<T> { pub v: T }
1616

1717
impl<T> A<T> {
1818
pub fn foo(&self) -> int {
@@ -52,9 +52,9 @@ impl<T> B<T> {
5252
}
5353

5454
pub fn foo() -> int {
55-
let a = A::<()>;
56-
let b = B::<()>;
57-
let c = test::A::<()>;
55+
let a = A { v: () };
56+
let b = B { v: () };
57+
let c = test::A { v: () };
5858
return a.foo() + a.bar() +
5959
b.foo() + b.bar() +
6060
c.foo() + c.bar();

src/test/auxiliary/issue-14421.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#![crate_type="lib"]
1212
#![deny(warnings)]
13+
#![allow(dead_code)]
1314

1415
pub use src::aliases::B;
1516
pub use src::hidden_core::make;
@@ -23,9 +24,9 @@ mod src {
2324
pub mod hidden_core {
2425
use super::aliases::B;
2526

26-
pub struct A<T>;
27+
pub struct A<T> { t: T }
2728

28-
pub fn make() -> B { A }
29+
pub fn make() -> B { A { t: 1.0 } }
2930

3031
impl<T> A<T> {
3132
pub fn foo(&mut self) { println!("called foo"); }

src/test/auxiliary/issue-16643.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#![crate_type = "lib"]
1212

13-
pub struct TreeBuilder<H>;
13+
pub struct TreeBuilder<H> { pub h: H }
1414

1515
impl<H> TreeBuilder<H> {
1616
pub fn process_token(&mut self) {

src/test/auxiliary/issue-17662.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#![crate_type = "lib"]
1212

1313
pub trait Foo<'a, T> {
14-
fn foo(&self) -> T;
14+
fn foo(&'a self) -> T;
1515
}
1616

1717
pub fn foo<'a, T>(x: &'a Foo<'a, T>) -> T {

src/test/auxiliary/issue-2380.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
#![allow(unknown_features)]
1515
#![feature(box_syntax)]
1616

17-
pub trait i<T> { }
17+
pub trait i<T>
18+
{
19+
fn dummy(&self, t: T) -> T { panic!() }
20+
}
1821

1922
pub fn f<T>() -> Box<i<T>+'static> {
2023
impl<T> i<T> for () { }

src/test/auxiliary/issue-2526.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@
1313

1414
#![feature(unsafe_destructor)]
1515

16+
use std::marker;
17+
1618
struct arc_destruct<T> {
17-
_data: int,
19+
_data: int,
20+
_marker: marker::PhantomData<T>
1821
}
1922

2023
#[unsafe_destructor]
@@ -24,7 +27,8 @@ impl<T: Sync> Drop for arc_destruct<T> {
2427

2528
fn arc_destruct<T: Sync>(data: int) -> arc_destruct<T> {
2629
arc_destruct {
27-
_data: data
30+
_data: data,
31+
_marker: marker::PhantomData
2832
}
2933
}
3034

src/test/auxiliary/issue_20389.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010

1111
pub trait T {
1212
type C;
13+
fn dummy(&self) { }
1314
}

0 commit comments

Comments
 (0)