Skip to content

Commit c964520

Browse files
Update tests after compiletest changes
1 parent fd28614 commit c964520

File tree

7 files changed

+63
-124
lines changed

7 files changed

+63
-124
lines changed

src/test/ui/associated-types/defaults-suitability.stderr

Lines changed: 29 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,154 +1,119 @@
11
error[E0277]: the trait bound `NotClone: std::clone::Clone` is not satisfied
22
--> $DIR/defaults-suitability.rs:17:14
33
|
4+
LL | trait Tr {
5+
| -------- required by `Tr`
46
LL | type Ty: Clone = NotClone;
57
| ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone`
6-
|
7-
note: required by `Tr`
8-
--> $DIR/defaults-suitability.rs:16:1
9-
|
10-
LL | trait Tr {
11-
| ^^^^^^^^
128

139
error[E0277]: the trait bound `NotClone: std::clone::Clone` is not satisfied
1410
--> $DIR/defaults-suitability.rs:22:27
1511
|
1612
LL | trait Tr2 where Self::Ty: Clone {
17-
| ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone`
18-
|
19-
note: required by `Tr2`
20-
--> $DIR/defaults-suitability.rs:22:1
21-
|
22-
LL | trait Tr2 where Self::Ty: Clone {
23-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13+
| --------------------------^^^^^
14+
| | |
15+
| | the trait `std::clone::Clone` is not implemented for `NotClone`
16+
| required by `Tr2`
2417

2518
error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
2619
--> $DIR/defaults-suitability.rs:35:15
2720
|
21+
LL | trait Foo<T> {
22+
| ------------ required by `Foo`
2823
LL | type Bar: Clone = Vec<T>;
2924
| ^^^^^ the trait `std::clone::Clone` is not implemented for `T`
3025
|
3126
= help: consider adding a `where T: std::clone::Clone` bound
3227
= note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<T>`
33-
note: required by `Foo`
34-
--> $DIR/defaults-suitability.rs:34:1
35-
|
36-
LL | trait Foo<T> {
37-
| ^^^^^^^^^^^^
3828

3929
error[E0277]: the trait bound `(): Foo<Self>` is not satisfied
4030
--> $DIR/defaults-suitability.rs:41:17
4131
|
32+
LL | trait Bar: Sized {
33+
| ---------------- required by `Bar`
34+
LL | // `(): Foo<Self>` might hold for some possible impls but not all.
4235
LL | type Assoc: Foo<Self> = ();
4336
| ^^^^^^^^^ the trait `Foo<Self>` is not implemented for `()`
44-
|
45-
note: required by `Bar`
46-
--> $DIR/defaults-suitability.rs:39:1
47-
|
48-
LL | trait Bar: Sized {
49-
| ^^^^^^^^^^^^^^^^
5037

5138
error[E0277]: the trait bound `NotClone: IsU8<NotClone>` is not satisfied
5239
--> $DIR/defaults-suitability.rs:61:18
5340
|
54-
LL | Self::Assoc: IsU8<Self::Assoc>,
55-
| ^^^^^^^^^^^^^^^^^ the trait `IsU8<NotClone>` is not implemented for `NotClone`
56-
|
57-
note: required by `D`
58-
--> $DIR/defaults-suitability.rs:58:1
59-
|
6041
LL | / trait D where
6142
LL | | Vec<Self::Assoc>: Clone,
6243
LL | |
6344
LL | | Self::Assoc: IsU8<Self::Assoc>,
45+
| | ^^^^^^^^^^^^^^^^^ the trait `IsU8<NotClone>` is not implemented for `NotClone`
6446
... |
6547
LL | | type Assoc = NotClone;
6648
LL | | }
67-
| |_^
49+
| |_- required by `D`
6850

6951
error[E0277]: the trait bound `bool: IsU8<NotClone>` is not satisfied
7052
--> $DIR/defaults-suitability.rs:63:11
7153
|
72-
LL | bool: IsU8<Self::Assoc>,
73-
| ^^^^^^^^^^^^^^^^^ the trait `IsU8<NotClone>` is not implemented for `bool`
74-
|
75-
note: required by `D`
76-
--> $DIR/defaults-suitability.rs:58:1
77-
|
7854
LL | / trait D where
7955
LL | | Vec<Self::Assoc>: Clone,
8056
LL | |
8157
LL | | Self::Assoc: IsU8<Self::Assoc>,
58+
LL | |
59+
LL | | bool: IsU8<Self::Assoc>,
60+
| | ^^^^^^^^^^^^^^^^^ the trait `IsU8<NotClone>` is not implemented for `bool`
8261
... |
8362
LL | | type Assoc = NotClone;
8463
LL | | }
85-
| |_^
64+
| |_- required by `D`
8665

8766
error[E0277]: the trait bound `NotClone: std::clone::Clone` is not satisfied
8867
--> $DIR/defaults-suitability.rs:59:23
8968
|
90-
LL | Vec<Self::Assoc>: Clone,
91-
| ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone`
92-
|
93-
= note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<NotClone>`
94-
note: required by `D`
95-
--> $DIR/defaults-suitability.rs:58:1
96-
|
9769
LL | / trait D where
9870
LL | | Vec<Self::Assoc>: Clone,
71+
| | ^^^^^ the trait `std::clone::Clone` is not implemented for `NotClone`
9972
LL | |
10073
LL | | Self::Assoc: IsU8<Self::Assoc>,
10174
... |
10275
LL | | type Assoc = NotClone;
10376
LL | | }
104-
| |_^
77+
| |_- required by `D`
78+
|
79+
= note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<NotClone>`
10580

10681
error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: std::clone::Clone` is not satisfied
10782
--> $DIR/defaults-suitability.rs:74:15
10883
|
84+
LL | trait Foo2<T> {
85+
| ------------- required by `Foo2`
10986
LL | type Bar: Clone = Vec<Self::Baz>;
11087
| ^^^^^ the trait `std::clone::Clone` is not implemented for `<Self as Foo2<T>>::Baz`
11188
|
11289
= help: consider adding a `where <Self as Foo2<T>>::Baz: std::clone::Clone` bound
11390
= note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<<Self as Foo2<T>>::Baz>`
114-
note: required by `Foo2`
115-
--> $DIR/defaults-suitability.rs:73:1
116-
|
117-
LL | trait Foo2<T> {
118-
| ^^^^^^^^^^^^^
11991

12092
error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: std::clone::Clone` is not satisfied
12193
--> $DIR/defaults-suitability.rs:83:15
12294
|
95+
LL | trait Foo25<T: Clone> {
96+
| --------------------- required by `Foo25`
12397
LL | type Bar: Clone = Vec<Self::Baz>;
12498
| ^^^^^ the trait `std::clone::Clone` is not implemented for `<Self as Foo25<T>>::Baz`
12599
|
126100
= help: consider adding a `where <Self as Foo25<T>>::Baz: std::clone::Clone` bound
127101
= note: required because of the requirements on the impl of `std::clone::Clone` for `std::vec::Vec<<Self as Foo25<T>>::Baz>`
128-
note: required by `Foo25`
129-
--> $DIR/defaults-suitability.rs:82:1
130-
|
131-
LL | trait Foo25<T: Clone> {
132-
| ^^^^^^^^^^^^^^^^^^^^^
133102

134103
error[E0277]: the trait bound `T: std::clone::Clone` is not satisfied
135104
--> $DIR/defaults-suitability.rs:92:16
136105
|
137-
LL | Self::Baz: Clone,
138-
| ^^^^^ the trait `std::clone::Clone` is not implemented for `T`
139-
|
140-
= help: consider adding a `where T: std::clone::Clone` bound
141-
note: required by `Foo3`
142-
--> $DIR/defaults-suitability.rs:90:1
143-
|
144106
LL | / trait Foo3<T> where
145107
LL | | Self::Bar: Clone,
146108
LL | | Self::Baz: Clone,
109+
| | ^^^^^ the trait `std::clone::Clone` is not implemented for `T`
147110
LL | |
148111
... |
149112
LL | | type Baz = T;
150113
LL | | }
151-
| |_^
114+
| |_- required by `Foo3`
115+
|
116+
= help: consider adding a `where T: std::clone::Clone` bound
152117

153118
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
154119
--> $DIR/defaults-suitability.rs:29:5

src/test/ui/associated-types/defaults-unsound-62211-1.stderr

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,49 @@
11
error[E0277]: the trait bound `Self: std::marker::Copy` is not satisfied
22
--> $DIR/defaults-unsound-62211-1.rs:23:18
33
|
4+
LL | trait UncheckedCopy: Sized {
5+
| -------------------------- required by `UncheckedCopy`
6+
...
47
LL | type Output: Copy
58
| ^^^^ the trait `std::marker::Copy` is not implemented for `Self`
69
|
710
= help: consider adding a `where Self: std::marker::Copy` bound
8-
note: required by `UncheckedCopy`
9-
--> $DIR/defaults-unsound-62211-1.rs:20:1
10-
|
11-
LL | trait UncheckedCopy: Sized {
12-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
1311

1412
error[E0277]: cannot add-assign `&'static str` to `Self`
1513
--> $DIR/defaults-unsound-62211-1.rs:27:7
1614
|
15+
LL | trait UncheckedCopy: Sized {
16+
| -------------------------- required by `UncheckedCopy`
17+
...
1718
LL | + AddAssign<&'static str>
1819
| ^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `Self += &'static str`
1920
|
2021
= help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `Self`
2122
= help: consider adding a `where Self: std::ops::AddAssign<&'static str>` bound
22-
note: required by `UncheckedCopy`
23-
--> $DIR/defaults-unsound-62211-1.rs:20:1
24-
|
25-
LL | trait UncheckedCopy: Sized {
26-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2723

2824
error[E0277]: the trait bound `Self: std::ops::Deref` is not satisfied
2925
--> $DIR/defaults-unsound-62211-1.rs:25:7
3026
|
27+
LL | trait UncheckedCopy: Sized {
28+
| -------------------------- required by `UncheckedCopy`
29+
...
3130
LL | + Deref<Target = str>
3231
| ^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `Self`
3332
|
3433
= help: consider adding a `where Self: std::ops::Deref` bound
35-
note: required by `UncheckedCopy`
36-
--> $DIR/defaults-unsound-62211-1.rs:20:1
37-
|
38-
LL | trait UncheckedCopy: Sized {
39-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
4034

4135
error[E0277]: `Self` doesn't implement `std::fmt::Display`
4236
--> $DIR/defaults-unsound-62211-1.rs:30:7
4337
|
38+
LL | trait UncheckedCopy: Sized {
39+
| -------------------------- required by `UncheckedCopy`
40+
...
4441
LL | + Display = Self;
4542
| ^^^^^^^ `Self` cannot be formatted with the default formatter
4643
|
4744
= help: the trait `std::fmt::Display` is not implemented for `Self`
4845
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
4946
= help: consider adding a `where Self: std::fmt::Display` bound
50-
note: required by `UncheckedCopy`
51-
--> $DIR/defaults-unsound-62211-1.rs:20:1
52-
|
53-
LL | trait UncheckedCopy: Sized {
54-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
5547

5648
error[E0277]: `T` doesn't implement `std::fmt::Display`
5749
--> $DIR/defaults-unsound-62211-1.rs:43:9

src/test/ui/associated-types/defaults-unsound-62211-2.stderr

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,49 @@
11
error[E0277]: the trait bound `Self: std::marker::Copy` is not satisfied
22
--> $DIR/defaults-unsound-62211-2.rs:23:18
33
|
4+
LL | trait UncheckedCopy: Sized {
5+
| -------------------------- required by `UncheckedCopy`
6+
...
47
LL | type Output: Copy
58
| ^^^^ the trait `std::marker::Copy` is not implemented for `Self`
69
|
710
= help: consider adding a `where Self: std::marker::Copy` bound
8-
note: required by `UncheckedCopy`
9-
--> $DIR/defaults-unsound-62211-2.rs:20:1
10-
|
11-
LL | trait UncheckedCopy: Sized {
12-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
1311

1412
error[E0277]: cannot add-assign `&'static str` to `Self`
1513
--> $DIR/defaults-unsound-62211-2.rs:27:7
1614
|
15+
LL | trait UncheckedCopy: Sized {
16+
| -------------------------- required by `UncheckedCopy`
17+
...
1718
LL | + AddAssign<&'static str>
1819
| ^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `Self += &'static str`
1920
|
2021
= help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `Self`
2122
= help: consider adding a `where Self: std::ops::AddAssign<&'static str>` bound
22-
note: required by `UncheckedCopy`
23-
--> $DIR/defaults-unsound-62211-2.rs:20:1
24-
|
25-
LL | trait UncheckedCopy: Sized {
26-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2723

2824
error[E0277]: the trait bound `Self: std::ops::Deref` is not satisfied
2925
--> $DIR/defaults-unsound-62211-2.rs:25:7
3026
|
27+
LL | trait UncheckedCopy: Sized {
28+
| -------------------------- required by `UncheckedCopy`
29+
...
3130
LL | + Deref<Target = str>
3231
| ^^^^^^^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `Self`
3332
|
3433
= help: consider adding a `where Self: std::ops::Deref` bound
35-
note: required by `UncheckedCopy`
36-
--> $DIR/defaults-unsound-62211-2.rs:20:1
37-
|
38-
LL | trait UncheckedCopy: Sized {
39-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
4034

4135
error[E0277]: `Self` doesn't implement `std::fmt::Display`
4236
--> $DIR/defaults-unsound-62211-2.rs:30:7
4337
|
38+
LL | trait UncheckedCopy: Sized {
39+
| -------------------------- required by `UncheckedCopy`
40+
...
4441
LL | + Display = Self;
4542
| ^^^^^^^ `Self` cannot be formatted with the default formatter
4643
|
4744
= help: the trait `std::fmt::Display` is not implemented for `Self`
4845
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
4946
= help: consider adding a `where Self: std::fmt::Display` bound
50-
note: required by `UncheckedCopy`
51-
--> $DIR/defaults-unsound-62211-2.rs:20:1
52-
|
53-
LL | trait UncheckedCopy: Sized {
54-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
5547

5648
error[E0277]: `T` doesn't implement `std::fmt::Display`
5749
--> $DIR/defaults-unsound-62211-2.rs:43:9

src/test/ui/associated-types/issue-43924.stderr

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
error[E0277]: the trait bound `(dyn std::string::ToString + 'static): std::default::Default` is not satisfied
22
--> $DIR/issue-43924.rs:7:15
33
|
4+
LL | trait Foo<T: Default + ToString> {
5+
| -------------------------------- required by `Foo`
46
LL | type Out: Default + ToString + ?Sized = dyn ToString;
57
| ^^^^^^^ the trait `std::default::Default` is not implemented for `(dyn std::string::ToString + 'static)`
6-
|
7-
note: required by `Foo`
8-
--> $DIR/issue-43924.rs:6:1
9-
|
10-
LL | trait Foo<T: Default + ToString> {
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128

139
error[E0277]: the trait bound `(dyn std::string::ToString + 'static): std::default::Default` is not satisfied
1410
--> $DIR/issue-43924.rs:10:6

src/test/ui/associated-types/issue-54182-1.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ macro_rules! overload {
2121
}
2222

2323
fn main() {
24-
let r: () = overload!(42, true);
24+
let () = overload!(42, true);
2525

2626
let r: f32 = overload!("Hello world", 13.0);
2727
assert_eq!(r, 13.0);
2828

29-
let r: () = overload!(42, true, 42.5);
29+
let () = overload!(42, true, 42.5);
3030

3131
let r: i32 = overload!("Hello world", 13.0, 42);
3232
assert_eq!(r, 42);

src/test/ui/associated-types/issue-63593.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ trait MyTrait {
99
type This = Self; //~ error: size for values of type `Self` cannot be known
1010
fn something<I: Inner<Self::This>>(i: I);
1111
}
12+
13+
fn main() {}
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
1-
error[E0601]: `main` function not found in crate `issue_63593`
2-
|
3-
= note: consider adding a `main` function to `$DIR/issue-63593.rs`
4-
51
error[E0277]: the size for values of type `Self` cannot be known at compilation time
62
--> $DIR/issue-63593.rs:9:5
73
|
4+
LL | trait MyTrait {
5+
| ------------- required by `MyTrait`
86
LL | type This = Self;
97
| ^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
108
|
119
= help: the trait `std::marker::Sized` is not implemented for `Self`
1210
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
1311
= help: consider adding a `where Self: std::marker::Sized` bound
14-
note: required by `MyTrait`
15-
--> $DIR/issue-63593.rs:8:1
16-
|
17-
LL | trait MyTrait {
18-
| ^^^^^^^^^^^^^
1912

20-
error: aborting due to 2 previous errors
13+
error: aborting due to previous error
2114

22-
Some errors have detailed explanations: E0277, E0601.
23-
For more information about an error, try `rustc --explain E0277`.
15+
For more information about this error, try `rustc --explain E0277`.

0 commit comments

Comments
 (0)