Files
rust/src/test/codegen
bors 878aef79dc Auto merge of #100810 - matthiaskrgr:rollup-xep778s, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #97963 (net listen backlog set to negative on Linux.)
 - #99935 (Reenable disabled early syntax gates as future-incompatibility lints)
 - #100129 (add miri-test-libstd support to libstd)
 - #100500 (Ban references to `Self` in trait object substs for projection predicates too.)
 - #100636 (Revert "Revert "Allow dynamic linking for iOS/tvOS targets."")
 - #100718 ([rustdoc] Fix item info display)
 - #100769 (Suggest adding a reference to a trait assoc item)
 - #100777 (elaborate how revisions work with FileCheck stuff in src/test/codegen)
 - #100796 (Refactor: remove unnecessary string searchings)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-08-20 20:08:26 +00:00
..
2022-07-01 17:45:13 +02:00
2022-05-17 07:11:29 -04:00
2021-12-12 11:20:03 +00:00
2021-12-12 11:20:03 +00:00
2021-03-14 01:46:00 +09:00
2022-02-19 17:29:56 +00:00
2022-07-07 09:27:44 +02:00
2021-12-12 11:20:03 +00:00
2022-07-01 17:45:13 +02:00
2022-06-15 18:38:26 -07:00
2021-08-03 07:59:59 -07:00
2022-05-13 12:08:54 -07:00
2022-04-20 09:25:47 +02:00
2022-07-01 17:45:13 +02:00
2022-07-01 17:45:13 +02:00
2022-07-01 17:45:13 +02:00

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