Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_builtin_macros/src/autodiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ mod llvm_enzyme {
let meta_item_vec: ThinVec<MetaItemInner> = match meta_item.kind {
ast::MetaItemKind::List(ref vec) => vec.clone(),
_ => {
dcx.emit_err(errors::AutoDiffInvalidApplication { span: item.span() });
dcx.emit_err(errors::AutoDiffMissingConfig { span: item.span() });
return vec![item];
}
};
Expand Down
4 changes: 2 additions & 2 deletions tests/ui/autodiff/autodiff_illegal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn dummy() {
// Malformed, where args?
#[autodiff]
pub fn f7(x: f64) {
//~^ ERROR autodiff must be applied to function
//~^ ERROR autodiff requires at least a name and mode
unimplemented!()
}

Expand All @@ -77,7 +77,7 @@ pub fn f8(x: f64) {
// Invalid attribute syntax
#[autodiff = ""]
pub fn f9(x: f64) {
//~^ ERROR autodiff must be applied to function
//~^ ERROR autodiff requires at least a name and mode
unimplemented!()
}

Expand Down
4 changes: 2 additions & 2 deletions tests/ui/autodiff/autodiff_illegal.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ error: autodiff must be applied to function
LL | let add_one_v2 = |x: u32| -> u32 { x + 1 };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: autodiff must be applied to function
error: autodiff requires at least a name and mode
--> $DIR/autodiff_illegal.rs:65:1
|
LL | / pub fn f7(x: f64) {
Expand All @@ -80,7 +80,7 @@ LL | | unimplemented!()
LL | | }
| |_^

error: autodiff must be applied to function
error: autodiff requires at least a name and mode
--> $DIR/autodiff_illegal.rs:79:1
|
LL | / pub fn f9(x: f64) {
Expand Down
Loading