Skip to content
TILens What matters today in tech v0.4.0
Theme

Topic - Edition

Rust news

2 items on 29 Nov 2026
Rust

Alignment change on grow/shrink

Hey, I'm currently implementing a bump allocator to learn about the Allocator trait. The documentation for grow and shrink states: Note that new_layout.align() need not be the same as old_layout.align(). My intuition…

Source: Rust Users Forum h4kor
Rust

Different lifetimes in struct impl and trait impl

I've defined this simple struct for a lexer: struct Lexer<'a> { source: &'a [u8], pos: usize, } For convenience, I've implemented std::ops::Index so that I can write lexer[begin..end] instead of…

Source: Rust Users Forum dawit