Skip to content

Commit da43aa6

Browse files
committed
Bless tests.
1 parent 6709648 commit da43aa6

9 files changed

+161
-161
lines changed

src/test/ui/associated-item/issue-48027.stderr

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
1-
error[E0038]: the trait `Bar` cannot be made into an object
2-
--> $DIR/issue-48027.rs:6:6
3-
|
4-
LL | impl dyn Bar {}
5-
| ^^^^^^^ `Bar` cannot be made into an object
6-
|
7-
= help: consider moving `X` to another trait
8-
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
9-
--> $DIR/issue-48027.rs:2:11
10-
|
11-
LL | trait Bar {
12-
| --- this trait cannot be made into an object...
13-
LL | const X: usize;
14-
| ^ ...because it contains this associated `const`
15-
161
error[E0283]: type annotations needed
172
--> $DIR/issue-48027.rs:3:32
183
|
@@ -30,6 +15,21 @@ note: required by `Bar::X`
3015
LL | const X: usize;
3116
| ^^^^^^^^^^^^^^^
3217

18+
error[E0038]: the trait `Bar` cannot be made into an object
19+
--> $DIR/issue-48027.rs:6:6
20+
|
21+
LL | impl dyn Bar {}
22+
| ^^^^^^^ `Bar` cannot be made into an object
23+
|
24+
= help: consider moving `X` to another trait
25+
note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
26+
--> $DIR/issue-48027.rs:2:11
27+
|
28+
LL | trait Bar {
29+
| --- this trait cannot be made into an object...
30+
LL | const X: usize;
31+
| ^ ...because it contains this associated `const`
32+
3333
error: aborting due to 2 previous errors
3434

3535
Some errors have detailed explanations: E0038, E0283.

src/test/ui/associated-types/hr-associated-type-bound-param-2.stderr

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,31 @@ LL | for<'b> <T as Z<'b, u16>>::W: Clone,
1414
<&T as Clone>
1515

1616
error[E0277]: the trait bound `for<'b> <u16 as Z<'b, u16>>::W: Clone` is not satisfied
17-
--> $DIR/hr-associated-type-bound-param-2.rs:16:14
17+
--> $DIR/hr-associated-type-bound-param-2.rs:4:8
1818
|
1919
LL | trait Z<'a, T: ?Sized>
2020
| - required by a bound in this
21+
LL | where
22+
LL | T: Z<'a, u16>,
23+
| ^^^^^^^^^^ the trait `for<'b> Clone` is not implemented for `<u16 as Z<'b, u16>>::W`
2124
...
2225
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
2326
| ----- required by this bound in `Z`
24-
...
25-
LL | type W = str;
26-
| ^^^ the trait `for<'b> Clone` is not implemented for `<u16 as Z<'b, u16>>::W`
2727
|
2828
= help: the following implementations were found:
2929
<&T as Clone>
3030

3131
error[E0277]: the trait bound `for<'b> <u16 as Z<'b, u16>>::W: Clone` is not satisfied
32-
--> $DIR/hr-associated-type-bound-param-2.rs:4:8
32+
--> $DIR/hr-associated-type-bound-param-2.rs:16:14
3333
|
3434
LL | trait Z<'a, T: ?Sized>
3535
| - required by a bound in this
36-
LL | where
37-
LL | T: Z<'a, u16>,
38-
| ^^^^^^^^^^ the trait `for<'b> Clone` is not implemented for `<u16 as Z<'b, u16>>::W`
3936
...
4037
LL | for<'b> <T as Z<'b, u16>>::W: Clone,
4138
| ----- required by this bound in `Z`
39+
...
40+
LL | type W = str;
41+
| ^^^ the trait `for<'b> Clone` is not implemented for `<u16 as Z<'b, u16>>::W`
4242
|
4343
= help: the following implementations were found:
4444
<&T as Clone>

src/test/ui/const-generics/const-param-elided-lifetime.min.stderr

+9-9
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,28 @@ LL | impl<const N: &u8> A<N> {
4747
= help: more complex types are supported with `#![feature(const_generics)]`
4848

4949
error: `&'static u8` is forbidden as the type of a const generic parameter
50-
--> $DIR/const-param-elided-lifetime.rs:23:15
50+
--> $DIR/const-param-elided-lifetime.rs:18:21
5151
|
52-
LL | impl<const N: &u8> B for A<N> {}
53-
| ^^^
52+
LL | fn foo<const M: &u8>(&self) {}
53+
| ^^^
5454
|
5555
= note: the only supported types are integers, `bool` and `char`
5656
= help: more complex types are supported with `#![feature(const_generics)]`
5757

5858
error: `&'static u8` is forbidden as the type of a const generic parameter
59-
--> $DIR/const-param-elided-lifetime.rs:27:17
59+
--> $DIR/const-param-elided-lifetime.rs:23:15
6060
|
61-
LL | fn bar<const N: &u8>() {}
62-
| ^^^
61+
LL | impl<const N: &u8> B for A<N> {}
62+
| ^^^
6363
|
6464
= note: the only supported types are integers, `bool` and `char`
6565
= help: more complex types are supported with `#![feature(const_generics)]`
6666

6767
error: `&'static u8` is forbidden as the type of a const generic parameter
68-
--> $DIR/const-param-elided-lifetime.rs:18:21
68+
--> $DIR/const-param-elided-lifetime.rs:27:17
6969
|
70-
LL | fn foo<const M: &u8>(&self) {}
71-
| ^^^
70+
LL | fn bar<const N: &u8>() {}
71+
| ^^^
7272
|
7373
= note: the only supported types are integers, `bool` and `char`
7474
= help: more complex types are supported with `#![feature(const_generics)]`

src/test/ui/dep-graph/dep-graph-struct-signature.stderr

+36-36
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ error: no path from `WillChange` to `trait_def`
1616
LL | #[rustc_then_this_would_need(trait_def)]
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1818

19+
error: OK
20+
--> $DIR/dep-graph-struct-signature.rs:31:9
21+
|
22+
LL | #[rustc_then_this_would_need(fn_sig)]
23+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24+
1925
error: OK
2026
--> $DIR/dep-graph-struct-signature.rs:35:5
2127
|
@@ -46,12 +52,36 @@ error: OK
4652
LL | #[rustc_then_this_would_need(type_of)]
4753
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4854

55+
error: OK
56+
--> $DIR/dep-graph-struct-signature.rs:47:9
57+
|
58+
LL | #[rustc_then_this_would_need(fn_sig)]
59+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60+
61+
error: OK
62+
--> $DIR/dep-graph-struct-signature.rs:48:9
63+
|
64+
LL | #[rustc_then_this_would_need(typeck)]
65+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66+
4967
error: OK
5068
--> $DIR/dep-graph-struct-signature.rs:52:5
5169
|
5270
LL | #[rustc_then_this_would_need(type_of)]
5371
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5472

73+
error: OK
74+
--> $DIR/dep-graph-struct-signature.rs:54:9
75+
|
76+
LL | #[rustc_then_this_would_need(fn_sig)]
77+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78+
79+
error: OK
80+
--> $DIR/dep-graph-struct-signature.rs:55:9
81+
|
82+
LL | #[rustc_then_this_would_need(typeck)]
83+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84+
5585
error: OK
5686
--> $DIR/dep-graph-struct-signature.rs:60:9
5787
|
@@ -76,6 +106,12 @@ error: no path from `WillChange` to `type_of`
76106
LL | #[rustc_then_this_would_need(type_of)]
77107
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78108

109+
error: no path from `WillChange` to `fn_sig`
110+
--> $DIR/dep-graph-struct-signature.rs:76:9
111+
|
112+
LL | #[rustc_then_this_would_need(fn_sig)]
113+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114+
79115
error: no path from `WillChange` to `fn_sig`
80116
--> $DIR/dep-graph-struct-signature.rs:80:5
81117
|
@@ -94,41 +130,5 @@ error: no path from `WillChange` to `typeck`
94130
LL | #[rustc_then_this_would_need(typeck)]
95131
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96132

97-
error: OK
98-
--> $DIR/dep-graph-struct-signature.rs:31:9
99-
|
100-
LL | #[rustc_then_this_would_need(fn_sig)]
101-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
102-
103-
error: no path from `WillChange` to `fn_sig`
104-
--> $DIR/dep-graph-struct-signature.rs:76:9
105-
|
106-
LL | #[rustc_then_this_would_need(fn_sig)]
107-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108-
109-
error: OK
110-
--> $DIR/dep-graph-struct-signature.rs:47:9
111-
|
112-
LL | #[rustc_then_this_would_need(fn_sig)]
113-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114-
115-
error: OK
116-
--> $DIR/dep-graph-struct-signature.rs:48:9
117-
|
118-
LL | #[rustc_then_this_would_need(typeck)]
119-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120-
121-
error: OK
122-
--> $DIR/dep-graph-struct-signature.rs:54:9
123-
|
124-
LL | #[rustc_then_this_would_need(fn_sig)]
125-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126-
127-
error: OK
128-
--> $DIR/dep-graph-struct-signature.rs:55:9
129-
|
130-
LL | #[rustc_then_this_would_need(typeck)]
131-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132-
133133
error: aborting due to 22 previous errors
134134

src/test/ui/dep-graph/dep-graph-type-alias.stderr

+18-18
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,30 @@ error: no path from `TypeAlias` to `type_of`
2828
LL | #[rustc_then_this_would_need(type_of)]
2929
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3030

31+
error: OK
32+
--> $DIR/dep-graph-type-alias.rs:35:5
33+
|
34+
LL | #[rustc_then_this_would_need(fn_sig)]
35+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36+
3137
error: no path from `TypeAlias` to `type_of`
3238
--> $DIR/dep-graph-type-alias.rs:41:1
3339
|
3440
LL | #[rustc_then_this_would_need(type_of)]
3541
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3642

43+
error: OK
44+
--> $DIR/dep-graph-type-alias.rs:43:5
45+
|
46+
LL | #[rustc_then_this_would_need(fn_sig)]
47+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48+
49+
error: OK
50+
--> $DIR/dep-graph-type-alias.rs:44:5
51+
|
52+
LL | #[rustc_then_this_would_need(typeck)]
53+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54+
3755
error: OK
3856
--> $DIR/dep-graph-type-alias.rs:48:1
3957
|
@@ -52,23 +70,5 @@ error: OK
5270
LL | #[rustc_then_this_would_need(typeck)]
5371
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5472

55-
error: OK
56-
--> $DIR/dep-graph-type-alias.rs:35:5
57-
|
58-
LL | #[rustc_then_this_would_need(fn_sig)]
59-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60-
61-
error: OK
62-
--> $DIR/dep-graph-type-alias.rs:43:5
63-
|
64-
LL | #[rustc_then_this_would_need(fn_sig)]
65-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66-
67-
error: OK
68-
--> $DIR/dep-graph-type-alias.rs:44:5
69-
|
70-
LL | #[rustc_then_this_would_need(typeck)]
71-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
72-
7373
error: aborting due to 12 previous errors
7474

src/test/ui/feature-gates/feature-gate-arbitrary_self_types-raw-pointer.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
error[E0658]: `*const Self` cannot be used as the type of `self` without the `arbitrary_self_types` feature
2-
--> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:9:18
1+
error[E0658]: `*const Foo` cannot be used as the type of `self` without the `arbitrary_self_types` feature
2+
--> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:4:18
33
|
4-
LL | fn bar(self: *const Self);
4+
LL | fn foo(self: *const Self) {}
55
| ^^^^^^^^^^^
66
|
77
= note: see issue #44874 <https://github.com/rust-lang/rust/issues/44874> for more information
88
= help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
99
= help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
1010

11-
error[E0658]: `*const Foo` cannot be used as the type of `self` without the `arbitrary_self_types` feature
12-
--> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:4:18
11+
error[E0658]: `*const Self` cannot be used as the type of `self` without the `arbitrary_self_types` feature
12+
--> $DIR/feature-gate-arbitrary_self_types-raw-pointer.rs:9:18
1313
|
14-
LL | fn foo(self: *const Self) {}
14+
LL | fn bar(self: *const Self);
1515
| ^^^^^^^^^^^
1616
|
1717
= note: see issue #44874 <https://github.com/rust-lang/rust/issues/44874> for more information

0 commit comments

Comments
 (0)