update ui test since the new frontend is a bit more lenient

This commit is contained in:
Manuel Drehwald 2025-10-05 23:10:25 -04:00
parent 52e7917586
commit 218fa60795
2 changed files with 5 additions and 57 deletions

View file

@ -110,15 +110,6 @@ fn f14(x: f32) -> Foo {
type MyFloat = f32;
// We would like to support type alias to f32/f64 in argument type in the future,
// but that requires us to implement our checks at a later stage
// like THIR which has type information available.
#[autodiff_reverse(df15, Active, Active)]
fn f15(x: MyFloat) -> f32 {
//~^^ ERROR failed to resolve: use of undeclared type `MyFloat` [E0433]
unimplemented!()
}
// We would like to support type alias to f32/f64 in return type in the future
#[autodiff_reverse(df16, Active, Active)]
fn f16(x: f32) -> MyFloat {
@ -136,13 +127,6 @@ fn f17(x: f64) -> F64Trans {
unimplemented!()
}
// We would like to support `#[repr(transparent)]` f32/f64 wrapper in argument type in the future
#[autodiff_reverse(df18, Active, Active)]
fn f18(x: F64Trans) -> f64 {
//~^^ ERROR failed to resolve: use of undeclared type `F64Trans` [E0433]
unimplemented!()
}
// Invalid return activity
#[autodiff_forward(df19, Dual, Active)]
fn f19(x: f32) -> f32 {
@ -163,11 +147,4 @@ fn f21(x: f32) -> f32 {
unimplemented!()
}
struct DoesNotImplDefault;
#[autodiff_forward(df22, Dual)]
pub fn f22() -> DoesNotImplDefault {
//~^^ ERROR the function or associated item `default` exists for tuple `(DoesNotImplDefault, DoesNotImplDefault)`, but its trait bounds were not satisfied
unimplemented!()
}
fn main() {}

View file

@ -107,53 +107,24 @@ LL | #[autodiff_reverse(df13, Reverse)]
| ^^^^^^^
error: invalid return activity Active in Forward Mode
--> $DIR/autodiff_illegal.rs:147:1
--> $DIR/autodiff_illegal.rs:131:1
|
LL | #[autodiff_forward(df19, Dual, Active)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: invalid return activity Dual in Reverse Mode
--> $DIR/autodiff_illegal.rs:153:1
--> $DIR/autodiff_illegal.rs:137:1
|
LL | #[autodiff_reverse(df20, Active, Dual)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: invalid return activity Duplicated in Reverse Mode
--> $DIR/autodiff_illegal.rs:160:1
--> $DIR/autodiff_illegal.rs:144:1
|
LL | #[autodiff_reverse(df21, Active, Duplicated)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0433]: failed to resolve: use of undeclared type `MyFloat`
--> $DIR/autodiff_illegal.rs:116:1
|
LL | #[autodiff_reverse(df15, Active, Active)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `MyFloat`
error: aborting due to 18 previous errors
error[E0433]: failed to resolve: use of undeclared type `F64Trans`
--> $DIR/autodiff_illegal.rs:140:1
|
LL | #[autodiff_reverse(df18, Active, Active)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared type `F64Trans`
error[E0599]: the function or associated item `default` exists for tuple `(DoesNotImplDefault, DoesNotImplDefault)`, but its trait bounds were not satisfied
--> $DIR/autodiff_illegal.rs:167:1
|
LL | struct DoesNotImplDefault;
| ------------------------- doesn't satisfy `DoesNotImplDefault: Default`
LL | #[autodiff_forward(df22, Dual)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function or associated item cannot be called on `(DoesNotImplDefault, DoesNotImplDefault)` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`DoesNotImplDefault: Default`
which is required by `(DoesNotImplDefault, DoesNotImplDefault): Default`
help: consider annotating `DoesNotImplDefault` with `#[derive(Default)]`
|
LL + #[derive(Default)]
LL | struct DoesNotImplDefault;
|
error: aborting due to 21 previous errors
Some errors have detailed explanations: E0428, E0433, E0599, E0658.
Some errors have detailed explanations: E0428, E0658.
For more information about an error, try `rustc --explain E0428`.