-
Obscure Rust: reborrowing is a half-baked feature | Reddit코딩Coding/★★Rust★★최신동향★및관련글 2022. 6. 27. 15:42728x90
Obscure Rust: reborrowing is a half-baked feature
fn reborrow<'a, 'b, T>(r: &'a mut &'b mut T) -> &'a mut T { r } fn mutate(i: &mut u32) -> &mut u32 { *i += 1; i } fn mutate_twice(mut i: &mut u32) -> &mut u32 { mutate(reborrow(&mut i)); mutate(i) }
Obscure Rust: reborrowing is a half-baked feature
Posted in r/rust by u/haibane_tenshi • 175 points and 36 comments
www.reddit.com
반응형'코딩Coding > ★★Rust★★최신동향★및관련글' 카테고리의 다른 글
Rust Released Cycle Explains | LGR (0) 2022.08.19 웹어셈블리 개발자, 파이썬보다 '러스트' 선호...왜? (0) 2022.07.06 Referencing parent from child (0) 2022.07.06 rust1.61에선 해결됨 ❤️I found a very fun Rust bug (0) 2022.06.29 Nine Rules for Elegant Rust Library APIs (0) 2022.06.26 Rust : Turtles all the way down (0) 2022.06.19 This Month in Rust OSDev: April 2022 (0) 2022.05.07 Rust for the Kubernetes Ecosystem - Deepu K Sasidharan - Rust Linz, April 2022 (0) 2022.05.02