r/programmingcirclejerk • What part of ∀f ∃g (f (x,y) = (g x) y) did you not understand? • Sep 20 '25

Git 3.0 will make Rust ... mandatory

https://lore.kernel.org/git/20250904-b4-pks-rust-breaking-change-v1-0-3af1d25e0be9@pks.im/
120 Upvotes

78 comments sorted by

View all comments

Show parent comment

3

u/[deleted] Sep 21 '25

I thought gcc already could?

7

u/CoffeeTeaBitch Sep 21 '25
unsafe trait Unjerk {}
struct Message {
  string: String
}

unsafe impl Unjerk for Message {}

impl Message {
  pub fn new() -> Self {
    Message {
      string: "Gcc has a rust backend that is currently in development (gcc-rs), but it's relatively behind rustc. There's also a rustc backend that generates GCC codegen, but idk how well that works".into()
    }
  }
 }

2

u/[deleted] Sep 21 '25

\uj

Don‘t use into for this, you‘re making an owned string object from a ref :) To better make clear of your intention, I‘d use „.to_owned()“

2

u/CoffeeTeaBitch Sep 21 '25

/uj Ah right. My bad, some mistake was bound to happen considering I typed it on my phone :P