miniblog.
← Back to all posts
Wilfred Hughes
Jan 31, 2024 at 06:42
@skybert
@emacs.ch Difftastic has very little unsafe, just the FFI to tree-sitter libraries. That said, I've actually seen safe Rust segfault in the past!
https://github.com/rust-lang/rust/issues/30081
Segfault in safe Rust when compiling with optimisations · Issue #30081 · rust-lang/rust
#![feature(box_syntax, box_patterns)] use std::num::Wrapping; #[derive(Debug, Clone)] pub enum Instruction { Increment { amount: Wrapping<i8>, }, Loop(Vec<Box<Instruction>>), } /// Defines a method...