News for hackers. Stuff that matters.
Re:Rust: A Critical Retrospective by flohofwoe on Friday May 20, 2022 @03:30AM (#31444372)
I had to try it out first, but yep, that's how it works:

    const assert = @import("std").debug.assert;

    fn get12() i32 {
        const opt_opt_val: ??i32 = 12;
        const val = opt_opt_val.?.?;
        comptime assert(val == 12);
        return val;
    }
[https://www.godbolt.org/z/oncd5shvP]

There are no comments on this comment yet.