mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-04 09:44:40 +00:00
fix autodiff parsing for non-trait impl fixes: https://github.com/rust-lang/rust/issues/153322 @Sa4dUs Looks like we missed a case. But also, going through the code, line 455 seems suspicious to me: `Annotatable::AssocItem(d_fn, Impl { of_trait: false })` Are we sure that this should always be an Impl, and never an impl of a trait? r? @oli-obk
The files here use the LLVM FileCheck framework, documented at https://llvm.org/docs/CommandGuide/FileCheck.html.
One extension worth noting is the use of revisions as custom prefixes for FileCheck. If your codegen test has different behavior based on the chosen target or different compiler flags that you want to exercise, you can use a revisions annotation, like so:
// revisions: aaa bbb
// [bbb] compile-flags: --flags-for-bbb
After specifying those variations, you can write different expected, or
explicitly unexpected output by using <prefix>-SAME: and <prefix>-NOT:,
like so:
// CHECK: expected code
// aaa-SAME: emitted-only-for-aaa
// aaa-NOT: emitted-only-for-bbb
// bbb-NOT: emitted-only-for-aaa
// bbb-SAME: emitted-only-for-bbb