Skip to content

Commit 62b9fa1

Browse files
committed
move tests from ui/kindck to ui/traits
1 parent caeda18 commit 62b9fa1

11 files changed

Lines changed: 48 additions & 52 deletions

tests/ui/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -784,10 +784,6 @@ These tests revolve around the `--json` compiler flag. See [JSON Output](https:/
784784

785785
Tests exercising keywords, such as attempting to use them as identifiers when not contextual keywords.
786786

787-
## `tests/ui/kindck/`
788-
789-
**FIXME**: `kindck` is no longer a thing, these tests probably need to be audited and rehomed.
790-
791787
## `tests/ui/label/`
792788

793789
Exercises block and loop `'label`s.

tests/ui/kindck/kindck-copy.stderr renamed to tests/ui/traits/basic-copyable-types.stderr

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0277]: the trait bound `&'static mut isize: Copy` is not satisfied
2-
--> $DIR/kindck-copy.rs:27:19
2+
--> $DIR/basic-copyable-types.rs:27:19
33
|
44
LL | assert_copy::<&'static mut isize>();
55
| ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&'static mut isize`
66
|
77
note: required by a bound in `assert_copy`
8-
--> $DIR/kindck-copy.rs:5:19
8+
--> $DIR/basic-copyable-types.rs:5:19
99
|
1010
LL | fn assert_copy<T: Copy>() {}
1111
| ^^^^ required by this bound in `assert_copy`
@@ -16,13 +16,13 @@ LL + assert_copy::<isize>();
1616
|
1717

1818
error[E0277]: the trait bound `&'a mut isize: Copy` is not satisfied
19-
--> $DIR/kindck-copy.rs:28:19
19+
--> $DIR/basic-copyable-types.rs:28:19
2020
|
2121
LL | assert_copy::<&'a mut isize>();
2222
| ^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&'a mut isize`
2323
|
2424
note: required by a bound in `assert_copy`
25-
--> $DIR/kindck-copy.rs:5:19
25+
--> $DIR/basic-copyable-types.rs:5:19
2626
|
2727
LL | fn assert_copy<T: Copy>() {}
2828
| ^^^^ required by this bound in `assert_copy`
@@ -33,114 +33,114 @@ LL + assert_copy::<isize>();
3333
|
3434

3535
error[E0277]: the trait bound `Box<isize>: Copy` is not satisfied
36-
--> $DIR/kindck-copy.rs:31:19
36+
--> $DIR/basic-copyable-types.rs:31:19
3737
|
3838
LL | assert_copy::<Box<isize>>();
3939
| ^^^^^^^^^^ the trait `Copy` is not implemented for `Box<isize>`
4040
|
4141
note: required by a bound in `assert_copy`
42-
--> $DIR/kindck-copy.rs:5:19
42+
--> $DIR/basic-copyable-types.rs:5:19
4343
|
4444
LL | fn assert_copy<T: Copy>() {}
4545
| ^^^^ required by this bound in `assert_copy`
4646

4747
error[E0277]: the trait bound `String: Copy` is not satisfied
48-
--> $DIR/kindck-copy.rs:32:19
48+
--> $DIR/basic-copyable-types.rs:32:19
4949
|
5050
LL | assert_copy::<String>();
5151
| ^^^^^^ the trait `Copy` is not implemented for `String`
5252
|
5353
note: required by a bound in `assert_copy`
54-
--> $DIR/kindck-copy.rs:5:19
54+
--> $DIR/basic-copyable-types.rs:5:19
5555
|
5656
LL | fn assert_copy<T: Copy>() {}
5757
| ^^^^ required by this bound in `assert_copy`
5858

5959
error[E0277]: the trait bound `Vec<isize>: Copy` is not satisfied
60-
--> $DIR/kindck-copy.rs:33:19
60+
--> $DIR/basic-copyable-types.rs:33:19
6161
|
6262
LL | assert_copy::<Vec<isize>>();
6363
| ^^^^^^^^^^ the trait `Copy` is not implemented for `Vec<isize>`
6464
|
6565
note: required by a bound in `assert_copy`
66-
--> $DIR/kindck-copy.rs:5:19
66+
--> $DIR/basic-copyable-types.rs:5:19
6767
|
6868
LL | fn assert_copy<T: Copy>() {}
6969
| ^^^^ required by this bound in `assert_copy`
7070

7171
error[E0277]: the trait bound `Box<&'a mut isize>: Copy` is not satisfied
72-
--> $DIR/kindck-copy.rs:34:19
72+
--> $DIR/basic-copyable-types.rs:34:19
7373
|
7474
LL | assert_copy::<Box<&'a mut isize>>();
7575
| ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Box<&'a mut isize>`
7676
|
7777
note: required by a bound in `assert_copy`
78-
--> $DIR/kindck-copy.rs:5:19
78+
--> $DIR/basic-copyable-types.rs:5:19
7979
|
8080
LL | fn assert_copy<T: Copy>() {}
8181
| ^^^^ required by this bound in `assert_copy`
8282

8383
error[E0277]: the trait bound `Box<dyn Dummy>: Copy` is not satisfied
84-
--> $DIR/kindck-copy.rs:42:19
84+
--> $DIR/basic-copyable-types.rs:42:19
8585
|
8686
LL | assert_copy::<Box<dyn Dummy>>();
8787
| ^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Box<dyn Dummy>`
8888
|
8989
note: required by a bound in `assert_copy`
90-
--> $DIR/kindck-copy.rs:5:19
90+
--> $DIR/basic-copyable-types.rs:5:19
9191
|
9292
LL | fn assert_copy<T: Copy>() {}
9393
| ^^^^ required by this bound in `assert_copy`
9494

9595
error[E0277]: the trait bound `Box<dyn Dummy + Send>: Copy` is not satisfied
96-
--> $DIR/kindck-copy.rs:43:19
96+
--> $DIR/basic-copyable-types.rs:43:19
9797
|
9898
LL | assert_copy::<Box<dyn Dummy + Send>>();
9999
| ^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Box<dyn Dummy + Send>`
100100
|
101101
note: required by a bound in `assert_copy`
102-
--> $DIR/kindck-copy.rs:5:19
102+
--> $DIR/basic-copyable-types.rs:5:19
103103
|
104104
LL | fn assert_copy<T: Copy>() {}
105105
| ^^^^ required by this bound in `assert_copy`
106106

107107
error[E0277]: the trait bound `&'a mut (dyn Dummy + Send + 'a): Copy` is not satisfied
108-
--> $DIR/kindck-copy.rs:46:19
108+
--> $DIR/basic-copyable-types.rs:46:19
109109
|
110110
LL | assert_copy::<&'a mut (dyn Dummy + Send)>();
111111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `&'a mut (dyn Dummy + Send + 'a)`
112112
|
113113
note: required by a bound in `assert_copy`
114-
--> $DIR/kindck-copy.rs:5:19
114+
--> $DIR/basic-copyable-types.rs:5:19
115115
|
116116
LL | fn assert_copy<T: Copy>() {}
117117
| ^^^^ required by this bound in `assert_copy`
118118

119119
error[E0277]: the trait bound `MyNoncopyStruct: Copy` is not satisfied
120-
--> $DIR/kindck-copy.rs:64:19
120+
--> $DIR/basic-copyable-types.rs:64:19
121121
|
122122
LL | assert_copy::<MyNoncopyStruct>();
123123
| ^^^^^^^^^^^^^^^ unsatisfied trait bound
124124
|
125125
help: the trait `Copy` is not implemented for `MyNoncopyStruct`
126-
--> $DIR/kindck-copy.rs:15:1
126+
--> $DIR/basic-copyable-types.rs:15:1
127127
|
128128
LL | struct MyNoncopyStruct {
129129
| ^^^^^^^^^^^^^^^^^^^^^^
130130
note: required by a bound in `assert_copy`
131-
--> $DIR/kindck-copy.rs:5:19
131+
--> $DIR/basic-copyable-types.rs:5:19
132132
|
133133
LL | fn assert_copy<T: Copy>() {}
134134
| ^^^^ required by this bound in `assert_copy`
135135

136136
error[E0277]: the trait bound `Rc<isize>: Copy` is not satisfied
137-
--> $DIR/kindck-copy.rs:67:19
137+
--> $DIR/basic-copyable-types.rs:67:19
138138
|
139139
LL | assert_copy::<Rc<isize>>();
140140
| ^^^^^^^^^ the trait `Copy` is not implemented for `Rc<isize>`
141141
|
142142
note: required by a bound in `assert_copy`
143-
--> $DIR/kindck-copy.rs:5:19
143+
--> $DIR/basic-copyable-types.rs:5:19
144144
|
145145
LL | fn assert_copy<T: Copy>() {}
146146
| ^^^^ required by this bound in `assert_copy`

tests/ui/kindck/kindck-nonsendable-1.stderr renamed to tests/ui/traits/closure-rc-not-send.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
error[E0277]: `Rc<usize>` cannot be sent between threads safely
2-
--> $DIR/kindck-nonsendable-1.rs:9:9
2+
--> $DIR/closure-rc-not-send.rs:9:9
33
|
44
LL | bar(move || foo(x));
55
| --- -------^^^^^^^
66
| | |
77
| | `Rc<usize>` cannot be sent between threads safely
8-
| | within this `{closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:16}`
8+
| | within this `{closure@$DIR/closure-rc-not-send.rs:9:9: 9:16}`
99
| required by a bound introduced by this call
1010
|
11-
= help: within `{closure@$DIR/kindck-nonsendable-1.rs:9:9: 9:16}`, the trait `Send` is not implemented for `Rc<usize>`
11+
= help: within `{closure@$DIR/closure-rc-not-send.rs:9:9: 9:16}`, the trait `Send` is not implemented for `Rc<usize>`
1212
note: required because it's used within this closure
13-
--> $DIR/kindck-nonsendable-1.rs:9:9
13+
--> $DIR/closure-rc-not-send.rs:9:9
1414
|
1515
LL | bar(move || foo(x));
1616
| ^^^^^^^
1717
note: required by a bound in `bar`
18-
--> $DIR/kindck-nonsendable-1.rs:5:22
18+
--> $DIR/closure-rc-not-send.rs:5:22
1919
|
2020
LL | fn bar<F: FnOnce() + Send>(_: F) {}
2121
| ^^^^ required by this bound in `bar`
File renamed without changes.

tests/ui/kindck/kindck-impl-type-params.stderr renamed to tests/ui/traits/copy-bounds-impl-type-params.stderr

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0277]: `T` cannot be sent between threads safely
2-
--> $DIR/kindck-impl-type-params.rs:18:13
2+
--> $DIR/copy-bounds-impl-type-params.rs:18:13
33
|
44
LL | let a = &t as &dyn Gettable<T>;
55
| ^^ `T` cannot be sent between threads safely
66
|
77
note: required for `S<T>` to implement `Gettable<T>`
8-
--> $DIR/kindck-impl-type-params.rs:14:32
8+
--> $DIR/copy-bounds-impl-type-params.rs:14:32
99
|
1010
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
1111
| ---- ^^^^^^^^^^^ ^^^^
@@ -18,13 +18,13 @@ LL | fn f<T: std::marker::Send>(val: T) {
1818
| +++++++++++++++++++
1919

2020
error[E0277]: the trait bound `T: Copy` is not satisfied
21-
--> $DIR/kindck-impl-type-params.rs:18:13
21+
--> $DIR/copy-bounds-impl-type-params.rs:18:13
2222
|
2323
LL | let a = &t as &dyn Gettable<T>;
2424
| ^^ the trait `Copy` is not implemented for `T`
2525
|
2626
note: required for `S<T>` to implement `Gettable<T>`
27-
--> $DIR/kindck-impl-type-params.rs:14:32
27+
--> $DIR/copy-bounds-impl-type-params.rs:14:32
2828
|
2929
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
3030
| ---- ^^^^^^^^^^^ ^^^^
@@ -37,13 +37,13 @@ LL | fn f<T: std::marker::Copy>(val: T) {
3737
| +++++++++++++++++++
3838

3939
error[E0277]: `T` cannot be sent between threads safely
40-
--> $DIR/kindck-impl-type-params.rs:25:31
40+
--> $DIR/copy-bounds-impl-type-params.rs:25:31
4141
|
4242
LL | let a: &dyn Gettable<T> = &t;
4343
| ^^ `T` cannot be sent between threads safely
4444
|
4545
note: required for `S<T>` to implement `Gettable<T>`
46-
--> $DIR/kindck-impl-type-params.rs:14:32
46+
--> $DIR/copy-bounds-impl-type-params.rs:14:32
4747
|
4848
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
4949
| ---- ^^^^^^^^^^^ ^^^^
@@ -56,13 +56,13 @@ LL | fn g<T: std::marker::Send>(val: T) {
5656
| +++++++++++++++++++
5757

5858
error[E0277]: the trait bound `T: Copy` is not satisfied
59-
--> $DIR/kindck-impl-type-params.rs:25:31
59+
--> $DIR/copy-bounds-impl-type-params.rs:25:31
6060
|
6161
LL | let a: &dyn Gettable<T> = &t;
6262
| ^^ the trait `Copy` is not implemented for `T`
6363
|
6464
note: required for `S<T>` to implement `Gettable<T>`
65-
--> $DIR/kindck-impl-type-params.rs:14:32
65+
--> $DIR/copy-bounds-impl-type-params.rs:14:32
6666
|
6767
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
6868
| ---- ^^^^^^^^^^^ ^^^^
@@ -75,18 +75,18 @@ LL | fn g<T: std::marker::Copy>(val: T) {
7575
| +++++++++++++++++++
7676

7777
error[E0277]: the trait bound `String: Copy` is not satisfied
78-
--> $DIR/kindck-impl-type-params.rs:38:13
78+
--> $DIR/copy-bounds-impl-type-params.rs:38:13
7979
|
8080
LL | let a = t as Box<dyn Gettable<String>>;
8181
| ^ the trait `Copy` is not implemented for `String`
8282
|
8383
help: the trait `Gettable<T>` is implemented for `S<T>`
84-
--> $DIR/kindck-impl-type-params.rs:14:1
84+
--> $DIR/copy-bounds-impl-type-params.rs:14:1
8585
|
8686
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
8787
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8888
note: required for `S<String>` to implement `Gettable<String>`
89-
--> $DIR/kindck-impl-type-params.rs:14:32
89+
--> $DIR/copy-bounds-impl-type-params.rs:14:32
9090
|
9191
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
9292
| ---- ^^^^^^^^^^^ ^^^^
@@ -95,18 +95,18 @@ LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
9595
= note: required for the cast from `Box<S<String>>` to `Box<dyn Gettable<String>>`
9696

9797
error[E0277]: the trait bound `Foo: Copy` is not satisfied
98-
--> $DIR/kindck-impl-type-params.rs:46:37
98+
--> $DIR/copy-bounds-impl-type-params.rs:46:37
9999
|
100100
LL | let a: Box<dyn Gettable<Foo>> = t;
101101
| ^ the trait `Copy` is not implemented for `Foo`
102102
|
103103
help: the trait `Gettable<T>` is implemented for `S<T>`
104-
--> $DIR/kindck-impl-type-params.rs:14:1
104+
--> $DIR/copy-bounds-impl-type-params.rs:14:1
105105
|
106106
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
107107
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108108
note: required for `S<Foo>` to implement `Gettable<Foo>`
109-
--> $DIR/kindck-impl-type-params.rs:14:32
109+
--> $DIR/copy-bounds-impl-type-params.rs:14:32
110110
|
111111
LL | impl<T: Send + Copy + 'static> Gettable<T> for S<T> {}
112112
| ---- ^^^^^^^^^^^ ^^^^
@@ -120,7 +120,7 @@ LL | struct Foo; // does not impl Copy
120120
|
121121

122122
error: lifetime may not live long enough
123-
--> $DIR/kindck-impl-type-params.rs:32:13
123+
--> $DIR/copy-bounds-impl-type-params.rs:32:13
124124
|
125125
LL | fn foo<'a>() {
126126
| -- lifetime `'a` defined here
File renamed without changes.

tests/ui/kindck/kindck-inherited-copy-bound.stderr renamed to tests/ui/traits/inherited-copy-bound.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
error[E0277]: the trait bound `Box<{integer}>: Foo` is not satisfied
2-
--> $DIR/kindck-inherited-copy-bound.rs:15:16
2+
--> $DIR/inherited-copy-bound.rs:15:16
33
|
44
LL | take_param(&x);
55
| ---------- ^^ the trait `Copy` is not implemented for `Box<{integer}>`
66
| |
77
| required by a bound introduced by this call
88
|
99
note: required for `Box<{integer}>` to implement `Foo`
10-
--> $DIR/kindck-inherited-copy-bound.rs:9:15
10+
--> $DIR/inherited-copy-bound.rs:9:15
1111
|
1212
LL | impl<T: Copy> Foo for T {}
1313
| ---- ^^^ ^
1414
| |
1515
| unsatisfied trait bound introduced here
1616
note: required by a bound in `take_param`
17-
--> $DIR/kindck-inherited-copy-bound.rs:11:18
17+
--> $DIR/inherited-copy-bound.rs:11:18
1818
|
1919
LL | fn take_param<T: Foo>(foo: &T) {}
2020
| ^^^ required by this bound in `take_param`
2121

2222
error[E0038]: the trait `Foo` is not dyn compatible
23-
--> $DIR/kindck-inherited-copy-bound.rs:21:24
23+
--> $DIR/inherited-copy-bound.rs:21:24
2424
|
2525
LL | let z = &x as &dyn Foo;
2626
| ^^^ `Foo` is not dyn compatible
2727
|
2828
note: for a trait to be dyn compatible it needs to allow building a vtable
2929
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
30-
--> $DIR/kindck-inherited-copy-bound.rs:5:12
30+
--> $DIR/inherited-copy-bound.rs:5:12
3131
|
3232
LL | trait Foo: Copy {
3333
| --- ^^^^ ...because it requires `Self: Sized`
File renamed without changes.

0 commit comments

Comments
 (0)