Skip to content

Commit f8ee1e0

Browse files
committed
Bless ui tests.
1 parent 60bf851 commit f8ee1e0

6 files changed

+97
-97
lines changed

src/test/ui/moves/use_of_moved_value_copy_suggestions.stderr

+14-14
Original file line numberDiff line numberDiff line change
@@ -143,36 +143,36 @@ LL | T: B + Trait + Copy,
143143
| ++++++++++++++
144144

145145
error[E0382]: use of moved value: `t`
146-
--> $DIR/use_of_moved_value_copy_suggestions.rs:83:9
146+
--> $DIR/use_of_moved_value_copy_suggestions.rs:75:9
147147
|
148-
LL | fn existing_colon_in_where<T>(t: T)
149-
| - move occurs because `t` has type `T`, which does not implement the `Copy` trait
150-
...
148+
LL | fn existing_colon<T:>(t: T) {
149+
| - move occurs because `t` has type `T`, which does not implement the `Copy` trait
150+
LL |
151151
LL | [t, t];
152152
| - ^ value used here after move
153153
| |
154154
| value moved here
155155
|
156-
help: consider further restricting this bound
156+
help: consider restricting type parameter `T`
157157
|
158-
LL | T: Copy,
159-
| ++++
158+
LL | fn existing_colon<T: Copy>(t: T) {
159+
| ++++
160160

161161
error[E0382]: use of moved value: `t`
162-
--> $DIR/use_of_moved_value_copy_suggestions.rs:75:9
162+
--> $DIR/use_of_moved_value_copy_suggestions.rs:83:9
163163
|
164-
LL | fn existing_colon<T:>(t: T) {
165-
| - move occurs because `t` has type `T`, which does not implement the `Copy` trait
166-
LL |
164+
LL | fn existing_colon_in_where<T>(t: T)
165+
| - move occurs because `t` has type `T`, which does not implement the `Copy` trait
166+
...
167167
LL | [t, t];
168168
| - ^ value used here after move
169169
| |
170170
| value moved here
171171
|
172-
help: consider restricting type parameter `T`
172+
help: consider further restricting this bound
173173
|
174-
LL | fn existing_colon<T: Copy>(t: T) {
175-
| ++++
174+
LL | T: Copy,
175+
| ++++
176176

177177
error: aborting due to 11 previous errors
178178

src/test/ui/proc-macro/attribute-with-error.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
error[E0308]: mismatched types
2-
--> $DIR/attribute-with-error.rs:25:22
3-
|
4-
LL | let a: i32 = "foo";
5-
| --- ^^^^^ expected `i32`, found `&str`
6-
| |
7-
| expected due to this
8-
91
error[E0308]: mismatched types
102
--> $DIR/attribute-with-error.rs:10:18
113
|
@@ -22,6 +14,14 @@ LL | let b: i32 = "f'oo";
2214
| |
2315
| expected due to this
2416

17+
error[E0308]: mismatched types
18+
--> $DIR/attribute-with-error.rs:25:22
19+
|
20+
LL | let a: i32 = "foo";
21+
| --- ^^^^^ expected `i32`, found `&str`
22+
| |
23+
| expected due to this
24+
2525
error[E0308]: mismatched types
2626
--> $DIR/attribute-with-error.rs:35:22
2727
|

src/test/ui/suggestions/impl-trait-with-missing-bounds.stderr

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
2+
--> $DIR/impl-trait-with-missing-bounds.rs:6:13
3+
|
4+
LL | qux(constraint);
5+
| --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
6+
| |
7+
| required by a bound introduced by this call
8+
|
9+
= help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
10+
note: required by a bound in `qux`
11+
--> $DIR/impl-trait-with-missing-bounds.rs:50:16
12+
|
13+
LL | fn qux(_: impl std::fmt::Debug) {}
14+
| ^^^^^^^^^^^^^^^ required by this bound in `qux`
15+
help: introduce a type parameter with a trait bound instead of using `impl Trait`
16+
|
17+
LL | fn foo<I: Iterator>(constraints: I) where <I as Iterator>::Item: Debug {
18+
| +++++++++++++ ~ ++++++++++++++++++++++++++++++++++
19+
120
error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
221
--> $DIR/impl-trait-with-missing-bounds.rs:14:13
322
|
@@ -74,25 +93,6 @@ help: introduce a type parameter with a trait bound instead of using `impl Trait
7493
LL | fn bak<I: Iterator + std::fmt::Debug>(constraints: I) where <I as Iterator>::Item: Debug {
7594
| +++++++++++++++++++++++++++++++ ~ ++++++++++++++++++++++++++++++++++
7695

77-
error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
78-
--> $DIR/impl-trait-with-missing-bounds.rs:6:13
79-
|
80-
LL | qux(constraint);
81-
| --- ^^^^^^^^^^ `<impl Iterator as Iterator>::Item` cannot be formatted using `{:?}` because it doesn't implement `Debug`
82-
| |
83-
| required by a bound introduced by this call
84-
|
85-
= help: the trait `Debug` is not implemented for `<impl Iterator as Iterator>::Item`
86-
note: required by a bound in `qux`
87-
--> $DIR/impl-trait-with-missing-bounds.rs:50:16
88-
|
89-
LL | fn qux(_: impl std::fmt::Debug) {}
90-
| ^^^^^^^^^^^^^^^ required by this bound in `qux`
91-
help: introduce a type parameter with a trait bound instead of using `impl Trait`
92-
|
93-
LL | fn foo<I: Iterator>(constraints: I) where <I as Iterator>::Item: Debug {
94-
| +++++++++++++ ~ ++++++++++++++++++++++++++++++++++
95-
9696
error[E0277]: `<impl Iterator as Iterator>::Item` doesn't implement `Debug`
9797
--> $DIR/impl-trait-with-missing-bounds.rs:45:13
9898
|

src/test/ui/suggestions/suggest-ref-macro.stderr

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
error[E0308]: mismatched types
2+
--> $DIR/suggest-ref-macro.rs:8:1
3+
|
4+
LL | #[hello]
5+
| ^^^^^^^^
6+
| |
7+
| expected `&mut i32`, found integer
8+
| arguments to this function are incorrect
9+
|
10+
note: function defined here
11+
--> $DIR/suggest-ref-macro.rs:8:1
12+
|
13+
LL | #[hello]
14+
| _-^^^^^^^
15+
LL | | fn abc() {}
16+
LL | |
17+
LL | | fn x(_: &mut i32) {}
18+
LL | |
19+
LL | | macro_rules! bla {
20+
| |_____________-
21+
= note: this error originates in the attribute macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
22+
123
error[E0308]: mismatched types
224
--> $DIR/suggest-ref-macro.rs:15:11
325
|
@@ -36,28 +58,6 @@ note: function defined here
3658
LL | fn x(_: &mut i32) {}
3759
| ^ -----------
3860

39-
error[E0308]: mismatched types
40-
--> $DIR/suggest-ref-macro.rs:8:1
41-
|
42-
LL | #[hello]
43-
| ^^^^^^^^
44-
| |
45-
| expected `&mut i32`, found integer
46-
| arguments to this function are incorrect
47-
|
48-
note: function defined here
49-
--> $DIR/suggest-ref-macro.rs:8:1
50-
|
51-
LL | #[hello]
52-
| _-^^^^^^^
53-
LL | | fn abc() {}
54-
LL | |
55-
LL | | fn x(_: &mut i32) {}
56-
LL | |
57-
LL | | macro_rules! bla {
58-
| |_____________-
59-
= note: this error originates in the attribute macro `hello` (in Nightly builds, run with -Z macro-backtrace for more info)
60-
6161
error: aborting due to 3 previous errors
6262

6363
For more information about this error, try `rustc --explain E0308`.

src/test/ui/union/union-derive-clone.mirunsafeck.stderr

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
error[E0277]: the trait bound `U1: Copy` is not satisfied
2+
--> $DIR/union-derive-clone.rs:6:10
3+
|
4+
LL | #[derive(Clone)]
5+
| ^^^^^ the trait `Copy` is not implemented for `U1`
6+
|
7+
note: required by a bound in `AssertParamIsCopy`
8+
--> $SRC_DIR/core/src/clone.rs:LL:COL
9+
|
10+
LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
11+
| ^^^^ required by this bound in `AssertParamIsCopy`
12+
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
13+
help: consider annotating `U1` with `#[derive(Copy)]`
14+
|
15+
LL | #[derive(Copy)]
16+
|
17+
118
error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
219
--> $DIR/union-derive-clone.rs:38:15
320
|
@@ -26,23 +43,6 @@ help: consider annotating `CloneNoCopy` with `#[derive(Clone, Copy)]`
2643
LL | #[derive(Clone, Copy)]
2744
|
2845

29-
error[E0277]: the trait bound `U1: Copy` is not satisfied
30-
--> $DIR/union-derive-clone.rs:6:10
31-
|
32-
LL | #[derive(Clone)]
33-
| ^^^^^ the trait `Copy` is not implemented for `U1`
34-
|
35-
note: required by a bound in `AssertParamIsCopy`
36-
--> $SRC_DIR/core/src/clone.rs:LL:COL
37-
|
38-
LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
39-
| ^^^^ required by this bound in `AssertParamIsCopy`
40-
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
41-
help: consider annotating `U1` with `#[derive(Copy)]`
42-
|
43-
LL | #[derive(Copy)]
44-
|
45-
4646
error: aborting due to 2 previous errors
4747

4848
Some errors have detailed explanations: E0277, E0599.

src/test/ui/union/union-derive-clone.thirunsafeck.stderr

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
error[E0277]: the trait bound `U1: Copy` is not satisfied
2+
--> $DIR/union-derive-clone.rs:6:10
3+
|
4+
LL | #[derive(Clone)]
5+
| ^^^^^ the trait `Copy` is not implemented for `U1`
6+
|
7+
note: required by a bound in `AssertParamIsCopy`
8+
--> $SRC_DIR/core/src/clone.rs:LL:COL
9+
|
10+
LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
11+
| ^^^^ required by this bound in `AssertParamIsCopy`
12+
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
13+
help: consider annotating `U1` with `#[derive(Copy)]`
14+
|
15+
LL | #[derive(Copy)]
16+
|
17+
118
error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
219
--> $DIR/union-derive-clone.rs:38:15
320
|
@@ -26,23 +43,6 @@ help: consider annotating `CloneNoCopy` with `#[derive(Clone, Copy)]`
2643
LL | #[derive(Clone, Copy)]
2744
|
2845

29-
error[E0277]: the trait bound `U1: Copy` is not satisfied
30-
--> $DIR/union-derive-clone.rs:6:10
31-
|
32-
LL | #[derive(Clone)]
33-
| ^^^^^ the trait `Copy` is not implemented for `U1`
34-
|
35-
note: required by a bound in `AssertParamIsCopy`
36-
--> $SRC_DIR/core/src/clone.rs:LL:COL
37-
|
38-
LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
39-
| ^^^^ required by this bound in `AssertParamIsCopy`
40-
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
41-
help: consider annotating `U1` with `#[derive(Copy)]`
42-
|
43-
LL | #[derive(Copy)]
44-
|
45-
4646
error: aborting due to 2 previous errors
4747

4848
Some errors have detailed explanations: E0277, E0599.

0 commit comments

Comments
 (0)