Awful Rust snippets for fun and profit

Description
seen something awful and want to post it here? send it to @goldsteinq
We recommend to visit

Community chat: https://t.me/hamster_kombat_chat_2

Website: https://hamster.network

Twitter: x.com/hamster_kombat

YouTube: https://www.youtube.com/@HamsterKombat_Official

Bot: https://t.me/hamster_kombat_bot

Last updated 1 month, 3 weeks ago

Your easy, fun crypto trading app for buying and trading any crypto on the market.
📱 App: @Blum
🤖 Trading Bot: @BlumCryptoTradingBot
🆘 Help: @BlumSupport
💬 Chat: @BlumCrypto_Chat

Last updated 7 months, 1 week ago

Turn your endless taps into a financial tool.
Join @tapswap_bot


Collaboration - @taping_Guru

Last updated 2 months, 1 week ago

6 months, 2 weeks ago
macros can close over their environment, …

macros can close over their environment, “breaking” hygiene

playground

I’d like to give a link to documentation here, but I don’t think this is actually documented anywhere? neither reference nor TLBORM mention it as far as I can see

UPD: ferrocene specification

7 months ago
cyclic associated types are okay under …

cyclic associated types are okay under lazy normalization / next solver
(you need ?Sized though, otherwise it tries to prove Assoc: Sized and fails)

godbolt
tracking issue

8 months, 1 week ago

wrote down some thoughts about error handling, specifically a pattern that I call “progress pattern” (probably it has another name somewhere, but I’m not aware of it)
https://github.com/GoldsteinE/gh-blog/blob/master/error_progress/README.md
thanks to @meowaffle for reviewing this!

(btw, are y’all ok with breaking the format like this sometimes?)

9 months, 4 weeks ago

my fix for this problem was merged and will be stable in rustc 1.81, unless something goes wrong
https://github.com/rust-lang/rust/pull/123043

GitHub

Disable dead variant removal for `#[repr(C)]` enums. by GoldsteinE · Pull Request #123043 · rust-lang/rust

This prevents removing dead branches from a #[repr(C)] enum (they now get discriminants allocated as if they were inhabited). Implementation notes: ABI of something like #[repr(C)] enum Foo { F...

1 year, 1 month ago

found this one while thinking about size of uninhabited types. Ralf seems to agree it’s a bug, so the patch will probably be accepted
playground
UCG issue
proposed patch

We recommend to visit

Community chat: https://t.me/hamster_kombat_chat_2

Website: https://hamster.network

Twitter: x.com/hamster_kombat

YouTube: https://www.youtube.com/@HamsterKombat_Official

Bot: https://t.me/hamster_kombat_bot

Last updated 1 month, 3 weeks ago

Your easy, fun crypto trading app for buying and trading any crypto on the market.
📱 App: @Blum
🤖 Trading Bot: @BlumCryptoTradingBot
🆘 Help: @BlumSupport
💬 Chat: @BlumCrypto_Chat

Last updated 7 months, 1 week ago

Turn your endless taps into a financial tool.
Join @tapswap_bot


Collaboration - @taping_Guru

Last updated 2 months, 1 week ago