DEREFERENCE_POINTER_THERE Telegram 8577
▪️Кстати, насчёт паник: вывод паник (по крайней мере, с panic hook по умолчанию) теперь предотвращает перемешивание вывода, если паникуют несколько потоков одновременно.

▪️Ещё касательно паник: PanicInfo разделили на два типа. Первый, в core, используется как аргумент в #[panic_handler] (вне #![no_std] не актуально), а второй, в std (переименованный в PanicHookInfo) как аргумент для хука паники. Как пишет Мара Бос:

PanicInfo
is used in two ways:

As argument to the
#[panic_handler] in no_std context.
As argument to the panic hook in std context.

In situation 1, the
PanicInfo always has a message (of type fmt::Arguments), but never a payload (of type &dyn Any).

In situation 2, the
PanicInfo always has a payload (which is often a String), but not always a message.

...

I don't see any good reasons for these to be the same type, other than historical reasons.

Как следствие, std::panic::PanicInfo теперь является алиасом (с #[deprecated]) на PanicHookInfo.

▪️И ещё насчёт паник: PanicInfo (который в core) обзавёлся новым методом message, который возвращает новый тип PanicMessage, реализующий Display. Да, сейчас это тонкая обёртка над fmt::Arguments.

▪️Стабилизировали новые API, в том числе:
🔸 core::error. Да, само по себе это не новое API, но трейт Error теперь можно использовать в #![no_std]
🔸hint::assert_unchecked — вызывает UB, если аргумент является false. Может быть полезно для того, чтобы сообщать оптимизатору инварианты, которые компилятор сам не выводит.
🔸fs::exists — фактически алиас для Path::try_exists, не переводит ошибки в false.
🔸AtomicBool::fetch_not
🔸Duration::abs_diff

В const-контексте теперь можно вызывать:
🔸char::from_u32_unchecked (и метод, и функцию в core::char)
🔸CStr::{count_bytes, from_ptr}
👍3



tgoop.com/dereference_pointer_there/8577
Create:
Last Update:

▪️Кстати, насчёт паник: вывод паник (по крайней мере, с panic hook по умолчанию) теперь предотвращает перемешивание вывода, если паникуют несколько потоков одновременно.

▪️Ещё касательно паник: PanicInfo разделили на два типа. Первый, в core, используется как аргумент в #[panic_handler] (вне #![no_std] не актуально), а второй, в std (переименованный в PanicHookInfo) как аргумент для хука паники. Как пишет Мара Бос:

PanicInfo
is used in two ways:

As argument to the
#[panic_handler] in no_std context.
As argument to the panic hook in std context.

In situation 1, the
PanicInfo always has a message (of type fmt::Arguments), but never a payload (of type &dyn Any).

In situation 2, the
PanicInfo always has a payload (which is often a String), but not always a message.

...

I don't see any good reasons for these to be the same type, other than historical reasons.

Как следствие, std::panic::PanicInfo теперь является алиасом (с #[deprecated]) на PanicHookInfo.

▪️И ещё насчёт паник: PanicInfo (который в core) обзавёлся новым методом message, который возвращает новый тип PanicMessage, реализующий Display. Да, сейчас это тонкая обёртка над fmt::Arguments.

▪️Стабилизировали новые API, в том числе:
🔸 core::error. Да, само по себе это не новое API, но трейт Error теперь можно использовать в #![no_std]
🔸hint::assert_unchecked — вызывает UB, если аргумент является false. Может быть полезно для того, чтобы сообщать оптимизатору инварианты, которые компилятор сам не выводит.
🔸fs::exists — фактически алиас для Path::try_exists, не переводит ошибки в false.
🔸AtomicBool::fetch_not
🔸Duration::abs_diff

В const-контексте теперь можно вызывать:
🔸char::from_u32_unchecked (и метод, и функцию в core::char)
🔸CStr::{count_bytes, from_ptr}

BY Блог*


Share with your friend now:
tgoop.com/dereference_pointer_there/8577

View MORE
Open in Telegram


Telegram News

Date: |

Telegram offers a powerful toolset that allows businesses to create and manage channels, groups, and bots to broadcast messages, engage in conversations, and offer reliable customer support via bots. With the sharp downturn in the crypto market, yelling has become a coping mechanism for many crypto traders. This screaming therapy became popular after the surge of Goblintown Ethereum NFTs at the end of May or early June. Here, holders made incoherent groaning sounds in late-night Twitter spaces. They also role-played as urine-loving Goblin creatures. Done! Now you’re the proud owner of a Telegram channel. The next step is to set up and customize your channel. With the administration mulling over limiting access to doxxing groups, a prominent Telegram doxxing group apparently went on a "revenge spree." Among the requests, the Brazilian electoral Court wanted to know if they could obtain data on the origins of malicious content posted on the platform. According to the TSE, this would enable the authorities to track false content and identify the user responsible for publishing it in the first place.
from us


Telegram Блог*
FROM American