<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/test/ui/allocator/no_std-alloc-error-handler-custom.rs, branch 1.52.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.52.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.52.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2021-03-09T19:40:33+00:00</updated>
<entry>
<title>add integration tests, unwind across FFI boundary</title>
<updated>2021-03-09T19:40:33+00:00</updated>
<author>
<name>katelyn a. martin</name>
<email>me+rustlang@katelyn.world</email>
</author>
<published>2020-12-12T01:54:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=baf227ea0c1e07fc54395a51e4b3881d701180cb'/>
<id>urn:sha1:baf227ea0c1e07fc54395a51e4b3881d701180cb</id>
<content type='text'>
 ### 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
      --&gt; 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.
</content>
</entry>
<entry>
<title>Drop support for cloudabi targets</title>
<updated>2020-11-22T22:11:41+00:00</updated>
<author>
<name>Lzu Tao</name>
<email>taolzu@gmail.com</email>
</author>
<published>2020-10-27T13:10:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6bfe27a3e0f1c4d77999ccc2350ab861327615a2'/>
<id>urn:sha1:6bfe27a3e0f1c4d77999ccc2350ab861327615a2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement Make `handle_alloc_error` default to panic (for no_std + liballoc)</title>
<updated>2020-10-02T07:00:29+00:00</updated>
<author>
<name>Harald Hoyer</name>
<email>harald@redhat.com</email>
</author>
<published>2020-09-07T08:45:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cadd12b5f020b9b2c7bb0c5e7078b81fbdcfb6d8'/>
<id>urn:sha1:cadd12b5f020b9b2c7bb0c5e7078b81fbdcfb6d8</id>
<content type='text'>
Related: https://github.com/rust-lang/rust/issues/66741

Guarded with `#![feature(default_alloc_error_handler)]` a default
`alloc_error_handler` is called, if a custom allocator is used and no
other custom `#[alloc_error_handler]` is defined.

The panic message does not contain the size anymore, because it would
pull in the fmt machinery, which would blow up the code size
significantly.
</content>
</entry>
</feed>
