Skip to content

Commit 03f22a4

Browse files
committed
fix tests
1 parent 18a6d12 commit 03f22a4

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

tests/pretty/autodiff_forward.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
pub fn f3(x: &[f64], y: f64) -> f64 {
5757
::core::panicking::panic("not implemented")
5858
}
59-
#[rustc_autodiff(Forward, Dual, Const, Const,)]
59+
#[rustc_autodiff(Forward, 1, Dual, Const, Const)]
6060
#[inline(never)]
6161
pub fn df3(x: &[f64], bx_0: &[f64], y: f64) -> f64 {
6262
unsafe { asm!("NOP", options(pure, nomem)); };

tests/pretty/autodiff_reverse.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
pub fn f3(x: &[f64], y: f64) -> f64 {
5252
::core::panicking::panic("not implemented")
5353
}
54-
#[rustc_autodiff(Reverse, Duplicated, Const, Active,)]
54+
#[rustc_autodiff(Reverse, 1, Duplicated, Const, Active)]
5555
#[inline(never)]
5656
pub fn df3(x: &[f64], dx_0: &mut [f64], y: f64, dret: f64) -> f64 {
5757
unsafe { asm!("NOP", options(pure, nomem)); };

tests/ui/autodiff/autodiff_illegal.stderr

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,24 @@ error: expected 1 activities, but found 2
1919
|
2020
LL | #[autodiff(df3, Reverse, Duplicated, Const)]
2121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22-
|
23-
= note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
2422

2523
error: expected 1 activities, but found 0
2624
--> $DIR/autodiff_illegal.rs:27:1
2725
|
2826
LL | #[autodiff(df4, Reverse)]
2927
| ^^^^^^^^^^^^^^^^^^^^^^^^^
30-
|
31-
= note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
3228

3329
error: Dual can not be used in Reverse Mode
3430
--> $DIR/autodiff_illegal.rs:34:1
3531
|
3632
LL | #[autodiff(df5, Reverse, Dual)]
3733
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38-
|
39-
= note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
4034

4135
error: Duplicated can not be used in Forward Mode
4236
--> $DIR/autodiff_illegal.rs:41:1
4337
|
4438
LL | #[autodiff(df6, Forward, Duplicated)]
4539
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46-
|
47-
= note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
4840

4941
error: Duplicated can not be used for this type
5042
--> $DIR/autodiff_illegal.rs:42:14
@@ -107,7 +99,6 @@ LL | #[autodiff(fn_exists, Reverse, Active)]
10799
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `fn_exists` redefined here
108100
|
109101
= note: `fn_exists` must be defined only once in the value namespace of this module
110-
= note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
111102

112103
error: autodiff requires at least a name and mode
113104
--> $DIR/autodiff_illegal.rs:95:1
@@ -135,40 +126,30 @@ error: invalid return activity Active in Forward Mode
135126
|
136127
LL | #[autodiff(df19, Forward, Dual, Active)]
137128
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
138-
|
139-
= note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
140129

141130
error: invalid return activity Dual in Reverse Mode
142131
--> $DIR/autodiff_illegal.rs:167:1
143132
|
144133
LL | #[autodiff(df20, Reverse, Active, Dual)]
145134
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146-
|
147-
= note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
148135

149136
error: invalid return activity Duplicated in Reverse Mode
150137
--> $DIR/autodiff_illegal.rs:174:1
151138
|
152139
LL | #[autodiff(df21, Reverse, Active, Duplicated)]
153140
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
154-
|
155-
= note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
156141

157142
error[E0433]: failed to resolve: use of undeclared type `MyFloat`
158143
--> $DIR/autodiff_illegal.rs:130:1
159144
|
160145
LL | #[autodiff(df15, Reverse, Active, Active)]
161146
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `MyFloat`
162-
|
163-
= note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
164147

165148
error[E0433]: failed to resolve: use of undeclared type `F64Trans`
166149
--> $DIR/autodiff_illegal.rs:154:1
167150
|
168151
LL | #[autodiff(df18, Reverse, Active, Active)]
169152
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `F64Trans`
170-
|
171-
= note: this error originates in the attribute macro `autodiff` (in Nightly builds, run with -Z macro-backtrace for more info)
172153

173154
error: aborting due to 22 previous errors
174155

0 commit comments

Comments
 (0)