You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/ui/autodiff/autodiff_illegal.rs
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -177,4 +177,11 @@ fn f21(x: f32) -> f32 {
177
177
unimplemented!()
178
178
}
179
179
180
+
structDoesNotImplDefault;
181
+
#[autodiff(df22,Forward,Dual)]
182
+
pubfnf22() -> DoesNotImplDefault{
183
+
//~^^ ERROR the function or associated item `default` exists for tuple `(DoesNotImplDefault, DoesNotImplDefault)`, but its trait bounds were not satisfied
Copy file name to clipboardExpand all lines: tests/ui/autodiff/autodiff_illegal.stderr
+19-2Lines changed: 19 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -151,7 +151,24 @@ error[E0433]: failed to resolve: use of undeclared type `F64Trans`
151
151
LL | #[autodiff(df18, Reverse, Active, Active)]
152
152
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `F64Trans`
153
153
154
-
error: aborting due to 22 previous errors
154
+
error[E0599]: the function or associated item `default` exists for tuple `(DoesNotImplDefault, DoesNotImplDefault)`, but its trait bounds were not satisfied
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item cannot be called on `(DoesNotImplDefault, DoesNotImplDefault)` due to unsatisfied trait bounds
161
+
|
162
+
= note: the following trait bounds were not satisfied:
163
+
`DoesNotImplDefault: Default`
164
+
which is required by `(DoesNotImplDefault, DoesNotImplDefault): Default`
165
+
help: consider annotating `DoesNotImplDefault` with `#[derive(Default)]`
166
+
|
167
+
LL + #[derive(Default)]
168
+
LL | struct DoesNotImplDefault;
169
+
|
170
+
171
+
error: aborting due to 23 previous errors
155
172
156
-
Some errors have detailed explanations: E0428, E0433, E0658.
173
+
Some errors have detailed explanations: E0428, E0433, E0599, E0658.
157
174
For more information about an error, try `rustc --explain E0428`.
0 commit comments