rust/src/test
katelyn a. martin baf227ea0c add integration tests, unwind across FFI boundary
### Integration Tests

    This commit introduces some new fixtures to the `run-make-fulldeps`
    test suite.

        * c-unwind-abi-catch-panic: Exercise unwinding a panic. This
          catches a panic across an FFI boundary and downcasts it into
          an integer.

        * c-unwind-abi-catch-lib-panic: This is similar to the previous
         `*catch-panic` test, however in this case the Rust code that
         panics resides in a separate crate.

 ### Add `rust_eh_personality` to `#[no_std]` alloc tests

    This commit addresses some test failures that now occur in the
    following two tests:

        * no_std-alloc-error-handler-custom.rs
        * no_std-alloc-error-handler-default.rs

    Each test now defines a `rust_eh_personality` extern function, in
    the same manner as shown in the "Writing an executable without
    stdlib" section of the `lang_items` documentation here:
    https://doc.rust-lang.org/unstable-book/language-features/lang-items.html#writing-an-executable-without-stdlib

    Without this change, these tests would fail to compile due to a
    linking error explaining that there was an "undefined reference
    to `rust_eh_personality'."

 ### Updated hash

    * update 32-bit hash in `impl1` test

 ### Panics

    This commit uses `panic!` macro invocations that return a string,
    rather than using an integer as a panic payload.

    Doing so avoids the following warnings that were observed during
    rollup for the `*-msvc-1` targets:

    ```
    warning: panic message is not a string literal
      --> panic.rs:10:16
       |
    10 |         panic!(x); // That is too big!
       |                ^
       |
       = note: `#[warn(non_fmt_panic)]` on by default
       = note: this is no longer accepted in Rust 2021
    help: add a "{}" format string to Display the message
       |
    10 |         panic!("{}", x); // That is too big!
       |                ^^^^^
    help: or use std::panic::panic_any instead
       |
    10 |         std::panic::panic_any(x); // That is too big!
       |         ^^^^^^^^^^^^^^^^^^^^^

    warning: 1 warning emitted
    ```

    See: https://github.com/rust-lang-ci/rust/runs/1992118428

    As these errors imply, panicking without a format string will be
    disallowed in Rust 2021, per #78500.
2021-03-09 14:40:33 -05:00
..
assembly Support LLVM 12 in rustc 2021-02-28 10:19:44 +01:00
auxiliary
codegen implement unwinding abi's (RFC 2945) 2021-03-09 14:38:29 -05:00
codegen-units
debuginfo Update tests for extern block linting 2021-01-13 07:49:16 -05:00
incremental Revert "Auto merge of #79637 - spastorino:revert-trait-inheritance-self, r=Mark-Simulacrum" 2021-02-05 18:56:56 -03:00
mir-opt Disable destination propagation on all mir-opt-levels 2021-03-06 00:00:00 +00:00
pretty Fix pretty printing of generic associated type constraints 2021-02-13 19:29:55 +00:00
run-make Remove storage markers if they won't be used during code generation 2021-02-28 20:10:44 +01:00
run-make-fulldeps add integration tests, unwind across FFI boundary 2021-03-09 14:40:33 -05:00
run-pass-valgrind Update tests for extern block linting 2021-01-13 07:49:16 -05:00
rustdoc Rollup merge of #80763 - petrochenkov:pubusecrate, r=estebank 2021-03-05 10:57:15 +01:00
rustdoc-gui Add GUI tests 2021-02-28 23:01:29 +01:00
rustdoc-js Add test for primitive search 2021-02-01 15:56:51 +01:00
rustdoc-js-std Add search index test for primitive types 2021-01-27 10:05:06 +01:00
rustdoc-json Remove krate.version; fix crate_version in JSON 2021-03-01 00:30:40 -05:00
rustdoc-ui Rollup merge of #82651 - jyn514:rustdoc-warnings, r=GuillaumeGomez 2021-03-07 10:41:13 +09:00
rustfix
ui add integration tests, unwind across FFI boundary 2021-03-09 14:40:33 -05:00
ui-fulldeps Allow/fix non_fmt_panic in tests. 2021-02-03 23:15:45 +01:00
COMPILER_TESTS.md