Skip to content

Commit 5b425c1

Browse files
committed
Fix fallout in tests.
1 parent 1b3734f commit 5b425c1

22 files changed

+27
-27
lines changed

src/test/auxiliary/method_self_arg2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ impl Foo {
3232
}
3333
}
3434

35-
pub trait Bar {
35+
pub trait Bar : Sized {
3636
fn foo1(&self);
3737
fn foo2(self);
3838
fn foo3(self: Box<Self>);

src/test/compile-fail/dst-sized-trait-param.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// parameter, the corresponding value must be sized. Also that the
1313
// self type must be sized if appropriate.
1414

15-
trait Foo<T> { fn take(self, x: &T) { } } // Note: T is sized
15+
trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
1616

1717
impl Foo<[int]> for uint { }
1818
//~^ ERROR the trait `core::kinds::Sized` is not implemented for the type `[int]`

src/test/compile-fail/issue-5543.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ fn main() {
1515
let r: Box<Foo> = box 5;
1616
let _m: Box<Foo> = r as Box<Foo>;
1717
//~^ ERROR `core::kinds::Sized` is not implemented for the type `Foo`
18-
//~| ERROR `Foo` is not implemented for the type `Foo`
1918
}

src/test/compile-fail/regions-infer-bound-from-trait-self.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ fn check_bound<'a,A:'a>(x: Inv<'a>, a: A) { }
2323

2424
// In these case, `Self` inherits `'static`.
2525

26-
trait InheritsFromStatic : 'static {
26+
trait InheritsFromStatic : Sized + 'static {
2727
fn foo1<'a>(self, x: Inv<'a>) {
2828
check_bound(x, self)
2929
}
3030
}
31-
trait InheritsFromStaticIndirectly : Static {
31+
trait InheritsFromStaticIndirectly : Sized + Static {
3232
fn foo1<'a>(self, x: Inv<'a>) {
3333
check_bound(x, self)
3434
}
@@ -37,21 +37,21 @@ trait InheritsFromStaticIndirectly : Static {
3737

3838
// In these case, `Self` inherits `'a`.
3939

40-
trait InheritsFromIs<'a> : 'a {
40+
trait InheritsFromIs<'a> : Sized + 'a {
4141
fn foo(self, x: Inv<'a>) {
4242
check_bound(x, self)
4343
}
4444
}
4545

46-
trait InheritsFromIsIndirectly<'a> : Is<'a> {
46+
trait InheritsFromIsIndirectly<'a> : Sized + Is<'a> {
4747
fn foo(self, x: Inv<'a>) {
4848
check_bound(x, self)
4949
}
5050
}
5151

5252
// In this case, `Self` inherits nothing.
5353

54-
trait InheritsFromNothing<'a> {
54+
trait InheritsFromNothing<'a> : Sized {
5555
fn foo(self, x: Inv<'a>) {
5656
check_bound(x, self)
5757
//~^ ERROR parameter type `Self` may not live long enough

src/test/compile-fail/trait-matching-lifetimes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct Foo<'a,'b> {
1616
y: &'b int,
1717
}
1818

19-
trait Tr {
19+
trait Tr : Sized {
2020
fn foo(x: Self) {}
2121
}
2222

src/test/compile-fail/trait-safety-fn-body.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Check that an unsafe impl does not imply that unsafe actions are
1212
// legal in the methods.
1313

14-
unsafe trait UnsafeTrait {
14+
unsafe trait UnsafeTrait : Sized {
1515
fn foo(self) { }
1616
}
1717

src/test/compile-fail/type-params-in-different-spaces-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// Test static calls to make sure that we align the Self and input
1212
// type parameters on a trait correctly.
1313

14-
trait Tr<T> {
14+
trait Tr<T> : Sized {
1515
fn op(T) -> Self;
1616
}
1717

src/test/compile-fail/type-params-in-different-spaces-3.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-
trait Tr {
11+
trait Tr : Sized {
1212
fn test<X>(u: X) -> Self {
1313
u //~ ERROR mismatched types
1414
}

src/test/compile-fail/unsized4.rs

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

1111
// Test that bounds are sized-compatible.
1212

13-
trait T {}
14-
13+
trait T : Sized {}
1514
fn f<Sized? Y: T>() {
1615
//~^ERROR incompatible bounds on `Y`, bound `T` does not allow unsized type
1716
}

src/test/debuginfo/issue7712.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// compile-flags:--debuginfo=1
1212
// min-lldb-version: 310
1313

14-
pub trait TraitWithDefaultMethod {
14+
pub trait TraitWithDefaultMethod : Sized {
1515
fn method(self) {
1616
()
1717
}

0 commit comments

Comments
 (0)