Loading...

Tag trends are in beta. Feedback? Thoughts? Email me at [email protected]

Example of how to handle references to static mut in Edition 2024

serde_json deserialization failing with internally tagged enum representation

You can make generators in stable Rust without any proc macros

Why is 99999999.0f32 equal to both itself and 100000000.0f32?

Why does only the const version of Iterator compile?

How do I make this macro more simple?

An updated version of my function that can only be called a set number of times enforced at compile time using const generics and some other nightly features.

Error: One type is more general than the other

What's the difference between `_ = "x";` and `let _ = "x";`. Both seem to be exactly the same.

Using feature(negative_impls), it's possible to create a Different trait which can be used to bypass certain conflicting implementations

Rust Oddity: Can't Touch This

Perhaps not a new discovery, but: box syntax on stable by (ab)using the fact that vec![x] expands to (box [x]).into_vec() (check asm)

Function that can only be called a set number of times enforced at compile time using const generics. (Useless but fun). (Nightly only).

I could never understand the Monty Hall problem, so I wrote this story/program, which finally helped me wrap my head around it!

Some experimentation with storing arbitrary data in fat pointers. I tried to explain everything with comments

Finally, `HashMap` can be constructed in `const` contexts on stable without `SyncLazy` or `lazy_static`..

Would you be interested in a `SliceAtleast` crate?

I hadn't seen an example of it being done, but I was happy to find that struct destructuring can be nested.

It's possible to make unimplementable traits in Rust

Concatenating arrays at compile-time in Rust 1.51! (Currently available in Beta)

Is there a simpler and safer way to get mutable references to different elements of a Vec?

Simulating Higher-kinded type by associated type and implementing Monad on top of it.

Struggling with generic associated types, function signatures and trait associated types.

Fun with GATs (and other unstable features)

GATs on Nightly!

A type that represents a subset of f32 values using const generics.

`const_trait_impl` is pretty sweet

Could this work, by inference?

An efficient bit pattern matcher parsed at compiletime

Rust Playground (In the Browser)

More →