File: unsizing-wfcheck-issue-126272.stderr

package info (click to toggle)
rustc 1.86.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid
  • size: 913,560 kB
  • sloc: xml: 158,127; python: 35,921; javascript: 19,689; sh: 19,600; cpp: 18,906; ansic: 13,124; asm: 4,376; makefile: 708; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (160 lines) | stat: -rw-r--r-- 7,778 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
  --> $DIR/unsizing-wfcheck-issue-126272.rs:12:13
   |
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
note: required by an implicit `Sized` bound in `Bar`
  --> $DIR/unsizing-wfcheck-issue-126272.rs:21:12
   |
LL | struct Bar<T>(T);
   |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
  --> $DIR/unsizing-wfcheck-issue-126272.rs:21:12
   |
LL | struct Bar<T>(T);
   |            ^  - ...if indirection were used here: `Box<T>`
   |            |
   |            this could be changed to `T: ?Sized`...

error[E0204]: the trait `ConstParamTy_` cannot be implemented for this type
  --> $DIR/unsizing-wfcheck-issue-126272.rs:8:32
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |                                ^^^^^^^^^^^^
...
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |     ----------------------------------------- this field does not implement `ConstParamTy_`
   |
   = note: this error originates in the derive macro `ConstParamTy` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0204]: the trait `ConstParamTy_` cannot be implemented for this type
  --> $DIR/unsizing-wfcheck-issue-126272.rs:8:32
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |                                ^^^^^^^^^^^^
...
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |     ----------------------------------------- this field does not implement `ConstParamTy_`
   |
note: the `ConstParamTy_` impl for `&'static Bar<(dyn Debug + 'static)>` requires that `(dyn Debug + 'static): Eq`
  --> $DIR/unsizing-wfcheck-issue-126272.rs:12:13
   |
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: the `ConstParamTy_` impl for `&'static Bar<(dyn Debug + 'static)>` requires that `(dyn Debug + 'static): Sized`
  --> $DIR/unsizing-wfcheck-issue-126272.rs:12:13
   |
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: the `ConstParamTy_` impl for `&'static Bar<(dyn Debug + 'static)>` requires that `(dyn Debug + 'static): UnsizedConstParamTy`
  --> $DIR/unsizing-wfcheck-issue-126272.rs:12:13
   |
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in the derive macro `ConstParamTy` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
  --> $DIR/unsizing-wfcheck-issue-126272.rs:12:5
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |          ----- in this derive macro expansion
...
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
   = help: the trait `Debug` is implemented for `Bar<T>`
note: required for `Bar<(dyn Debug + 'static)>` to implement `Debug`
  --> $DIR/unsizing-wfcheck-issue-126272.rs:20:10
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |          ^^^^^
LL | struct Bar<T>(T);
   |            - unsatisfied trait bound introduced in this `derive` macro
   = note: 2 redundant requirements hidden
   = note: required for `&&'static Bar<(dyn Debug + 'static)>` to implement `Debug`
   = note: required for the cast from `&&&'static Bar<(dyn Debug + 'static)>` to `&dyn Debug`
   = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0369]: binary operation `==` cannot be applied to type `&Bar<dyn Debug>`
  --> $DIR/unsizing-wfcheck-issue-126272.rs:12:5
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |                 --------- in this derive macro expansion
...
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `dyn Debug: Eq` is not satisfied
  --> $DIR/unsizing-wfcheck-issue-126272.rs:12:5
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |                            -- in this derive macro expansion
...
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Eq` is not implemented for `dyn Debug`
   |
   = help: the trait `Eq` is implemented for `Bar<T>`
note: required for `Bar<dyn Debug>` to implement `Eq`
  --> $DIR/unsizing-wfcheck-issue-126272.rs:20:28
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |                            ^^ unsatisfied trait bound introduced in this `derive` macro
   = note: 1 redundant requirement hidden
   = note: required for `&'static Bar<dyn Debug>` to implement `Eq`
note: required by a bound in `AssertParamIsEq`
  --> $SRC_DIR/core/src/cmp.rs:LL:COL
   = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the size for values of type `dyn Debug` cannot be known at compilation time
  --> $DIR/unsizing-wfcheck-issue-126272.rs:12:5
   |
LL | #[derive(Debug, PartialEq, Eq, ConstParamTy)]
   |                            -- in this derive macro expansion
...
LL |     nested: &'static Bar<dyn std::fmt::Debug>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `dyn Debug`
note: required by an implicit `Sized` bound in `Bar`
  --> $DIR/unsizing-wfcheck-issue-126272.rs:21:12
   |
LL | struct Bar<T>(T);
   |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
  --> $DIR/unsizing-wfcheck-issue-126272.rs:21:12
   |
LL | struct Bar<T>(T);
   |            ^  - ...if indirection were used here: `Box<T>`
   |            |
   |            this could be changed to `T: ?Sized`...
   = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the size for values of type `(dyn Debug + 'static)` cannot be known at compilation time
  --> $DIR/unsizing-wfcheck-issue-126272.rs:26:33
   |
LL |     let x: Test<{ Foo { nested: &Bar(4) } }> = Test;
   |                                 ^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `(dyn Debug + 'static)`
note: required by an implicit `Sized` bound in `Bar`
  --> $DIR/unsizing-wfcheck-issue-126272.rs:21:12
   |
LL | struct Bar<T>(T);
   |            ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
  --> $DIR/unsizing-wfcheck-issue-126272.rs:21:12
   |
LL | struct Bar<T>(T);
   |            ^  - ...if indirection were used here: `Box<T>`
   |            |
   |            this could be changed to `T: ?Sized`...

error: aborting due to 8 previous errors

Some errors have detailed explanations: E0204, E0277, E0369.
For more information about an error, try `rustc --explain E0204`.