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
-23Lines changed: 0 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -110,15 +110,6 @@ fn f14(x: f32) -> Foo {
110
110
111
111
typeMyFloat = f32;
112
112
113
-
// We would like to support type alias to f32/f64 in argument type in the future,
114
-
// but that requires us to implement our checks at a later stage
115
-
// like THIR which has type information available.
116
-
#[autodiff_reverse(df15,Active,Active)]
117
-
fnf15(x:MyFloat) -> f32{
118
-
//~^^ ERROR failed to resolve: use of undeclared type `MyFloat` [E0433]
119
-
unimplemented!()
120
-
}
121
-
122
113
// We would like to support type alias to f32/f64 in return type in the future
123
114
#[autodiff_reverse(df16,Active,Active)]
124
115
fnf16(x:f32) -> MyFloat{
@@ -136,13 +127,6 @@ fn f17(x: f64) -> F64Trans {
136
127
unimplemented!()
137
128
}
138
129
139
-
// We would like to support `#[repr(transparent)]` f32/f64 wrapper in argument type in the future
140
-
#[autodiff_reverse(df18,Active,Active)]
141
-
fnf18(x:F64Trans) -> f64{
142
-
//~^^ ERROR failed to resolve: use of undeclared type `F64Trans` [E0433]
143
-
unimplemented!()
144
-
}
145
-
146
130
// Invalid return activity
147
131
#[autodiff_forward(df19,Dual,Active)]
148
132
fnf19(x:f32) -> f32{
@@ -163,11 +147,4 @@ fn f21(x: f32) -> f32 {
163
147
unimplemented!()
164
148
}
165
149
166
-
structDoesNotImplDefault;
167
-
#[autodiff_forward(df22,Dual)]
168
-
pubfnf22() -> DoesNotImplDefault{
169
-
//~^^ ERROR the function or associated item `default` exists for tuple `(DoesNotImplDefault, DoesNotImplDefault)`, but its trait bounds were not satisfied
error[E0433]: failed to resolve: use of undeclared type `MyFloat`
128
-
--> $DIR/autodiff_illegal.rs:116:1
129
-
|
130
-
LL | #[autodiff_reverse(df15, Active, Active)]
131
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `MyFloat`
132
-
133
-
error[E0433]: failed to resolve: use of undeclared type `F64Trans`
134
-
--> $DIR/autodiff_illegal.rs:140:1
135
-
|
136
-
LL | #[autodiff_reverse(df18, Active, Active)]
137
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `F64Trans`
138
-
139
-
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
146
-
|
147
-
= note: the following trait bounds were not satisfied:
148
-
`DoesNotImplDefault: Default`
149
-
which is required by `(DoesNotImplDefault, DoesNotImplDefault): Default`
150
-
help: consider annotating `DoesNotImplDefault` with `#[derive(Default)]`
151
-
|
152
-
LL + #[derive(Default)]
153
-
LL | struct DoesNotImplDefault;
154
-
|
155
-
156
-
error: aborting due to 21 previous errors
127
+
error: aborting due to 18 previous errors
157
128
158
-
Some errors have detailed explanations: E0428, E0433, E0599, E0658.
129
+
Some errors have detailed explanations: E0428, E0658.
159
130
For more information about an error, try `rustc --explain E0428`.
0 commit comments