Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Kookie 馃崻馃嚨馃嚫
Kookie 馃崻馃嚨馃嚫
@kookie@chaosfem.tw  路  activity timestamp 6 days ago

I wish there was a Rust-type-system-y way for a type with a generic T to have (as an example) two Debug implementations, one for the case that T: Debug and one for when T does not in fact debug.

It is kind of a niche problem and I only run into it like once a year.

There's some ancient docs that talk about how the specialization feature will fix this but I think that effort has been abandoned due to unsoundness? akko_badday

I'm curious if anyone #onhere runs has the same cursed problems and if you found a solution you can live with akko_thonk

  • Copy link
  • Flag this post
  • Block
Kookie 馃崻馃嚨馃嚫
Kookie 馃崻馃嚨馃嚫
@kookie@chaosfem.tw replied  路  activity timestamp 6 days ago

I guess the easy way is to just enforce T: Debug but I think I will definitely have some Ts that won't be akko_sad

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About 路 Code of conduct 路 Privacy 路 Users 路 Instances
Bonfire social 路 1.0.2-alpha.7 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct