mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-02 09:47:57 +00:00
Rollup of 7 pull requests Successful merges: - rust-lang/rust#158073 (bootstrap: fix panic when repo path contains spaces by switching to CARGO_ENCODED_RUSTFLAGS) - rust-lang/rust#158256 (Avoid parser panics bubbling out to proc macros) - rust-lang/rust#158561 (Avoid building rustdoc for tests without doctests) - rust-lang/rust#158562 (Improve tracing of steps in bootstrap) - rust-lang/rust#157445 (Allow section override when using patchable-function-entries) - rust-lang/rust#158327 (Move attribute and keyword docs from `std` to `core`) - rust-lang/rust#158591 (Fix spacing issue for unused parentheses lint)
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