Skip to content

Commit 08ee2cf

Browse files
committed
---
yaml --- r: 212948 b: refs/heads/master c: 13cee1e h: refs/heads/master v: v3
1 parent 10f3988 commit 08ee2cf

8 files changed

+32
-21
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: f0f13f86ef434809282bc5eca1bd04a23fdf88d2
2+
refs/heads/master: 13cee1e1987936514266861a4afa231d7224ad93
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
55
refs/heads/try: 1864973ae17213c5a58c4dd3f9af6d1b6c7d2e05

trunk/src/test/compile-fail/associated-types-path-2.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ pub fn f1_uint_uint() {
4545
pub fn f1_uint_int() {
4646
f1(2u32, 4i32);
4747
//~^ ERROR the trait `Foo` is not implemented
48-
//~| ERROR the trait `Foo` is not implemented
4948
}
5049

5150
pub fn f2_int() {

trunk/src/test/compile-fail/dst-object-from-unsized-type.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
trait Foo { fn foo(&self) {} }
1414
impl Foo for str {}
15+
impl Foo for [u8] {}
1516

1617
fn test1<T: ?Sized + Foo>(t: &T) {
1718
let u: &Foo = t;
@@ -28,9 +29,9 @@ fn test3() {
2829
//~^ ERROR `core::marker::Sized` is not implemented for the type `str`
2930
}
3031

31-
fn test4() {
32-
let _: &Foo = "hi" as &Foo;
33-
//~^ ERROR `core::marker::Sized` is not implemented for the type `str`
32+
fn test4(x: &[u8]) {
33+
let _: &Foo = x as &Foo;
34+
//~^ ERROR `core::marker::Sized` is not implemented for the type `[u8]`
3435
}
3536

3637
fn main() { }

trunk/src/test/compile-fail/kindck-impl-type-params.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ fn foo2<'a>() {
5050
}
5151

5252
fn foo3<'a>() {
53-
let t: Box<S<String>> = box S(marker::PhantomData);
54-
let a: Box<Gettable<String>> = t;
53+
struct Foo; // does not impl Copy
54+
55+
let t: Box<S<Foo>> = box S(marker::PhantomData);
56+
let a: Box<Gettable<Foo>> = t;
5557
//~^ ERROR the trait `core::marker::Copy` is not implemented
5658
}
5759

trunk/src/test/compile-fail/trait-bounds-on-structs-and-enums.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct TupleLike(
5252
);
5353

5454
enum Enum {
55-
DictionaryLike { field: Bar<i32> }, //~ ERROR not implemented
55+
DictionaryLike { field: Bar<u8> }, //~ ERROR not implemented
5656
}
5757

5858
trait PolyTrait<T>
@@ -62,7 +62,7 @@ trait PolyTrait<T>
6262

6363
struct Struct;
6464

65-
impl PolyTrait<Foo<usize>> for Struct {
65+
impl PolyTrait<Foo<u16>> for Struct {
6666
//~^ ERROR not implemented
6767
}
6868

trunk/src/test/compile-fail/traits-negative-impls.rs

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ use std::marker::Send;
1919

2020
struct Outer<T: Send>(T);
2121

22-
struct TestType;
23-
impl !Send for TestType {}
24-
2522
struct Outer2<T>(T);
2623

2724
unsafe impl<T: Send> Sync for Outer2<T> {}
@@ -30,29 +27,41 @@ fn is_send<T: Send>(_: T) {}
3027
fn is_sync<T: Sync>(_: T) {}
3128

3229
fn dummy() {
30+
struct TestType;
31+
impl !Send for TestType {}
32+
3333
Outer(TestType);
34-
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType`
34+
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy::TestType`
3535

3636
is_send(TestType);
37-
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType`
37+
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy::TestType`
3838

3939
is_send((8, TestType));
40-
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType`
40+
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy::TestType`
4141
}
4242

4343
fn dummy2() {
44+
struct TestType;
45+
impl !Send for TestType {}
46+
4447
is_send(Box::new(TestType));
45-
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType`
48+
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy2::TestType`
4649
}
4750

4851
fn dummy3() {
52+
struct TestType;
53+
impl !Send for TestType {}
54+
4955
is_send(Box::new(Outer2(TestType)));
50-
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType`
56+
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `dummy3::TestType`
5157
}
5258

5359
fn main() {
60+
struct TestType;
61+
impl !Send for TestType {}
62+
5463
// This will complain about a missing Send impl because `Sync` is implement *just*
5564
// for T that are `Send`. Look at #20366 and #19950
5665
is_sync(Outer2(TestType));
57-
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `TestType`
66+
//~^ ERROR the trait `core::marker::Send` is not implemented for the type `main::TestType`
5867
}

trunk/src/test/compile-fail/typeck-default-trait-impl-trait-where-clause.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ fn test() {
4040
}
4141

4242
fn main() {
43-
foo::<i32>();
44-
//~^ ERROR the trait `NotImplemented` is not implemented for the type `core::option::Option<i32>`
43+
foo::<u32>();
44+
//~^ ERROR the trait `NotImplemented` is not implemented for the type `core::option::Option<u32>`
4545
}

trunk/src/test/compile-fail/unsized5.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct S3 {
2424
g: [usize]
2525
}
2626
struct S4 {
27-
f: str, //~ ERROR `core::marker::Sized` is not implemented
27+
f: [u8], //~ ERROR `core::marker::Sized` is not implemented
2828
g: usize
2929
}
3030
enum E<X: ?Sized> {

0 commit comments

Comments
 (0)