Re:totally_safe_transmute, Line-by-Line (2021)
by saghm on Monday January 08, 2024 @10:19PM
(#38921857)
That is certainly a strange bug! It took me several minutes to wrap my head around, but from if I'm reading correctly, `transmute_obj` shouldn't expect to be passed in a U because `<T as Object<U>>::Output` should be using `Object<U>::Output`, but instead it's using `T::Output`. I need to mess around with this later on my computer because I'd expect that `<T as Object<U>>::Output` accepting `T::Output` means that it would _not_ accept `Object<U>::Output`, and I'm super curious what error it would give if it were passed that instead...
[ Parent
| on HN ]
Re:totally_safe_transmute, Line-by-Line (2021)
by zyedidia on Monday January 08, 2024 @11:18PM
(#38922255)
The Rust team did a deep dive on the bug in 2020, which has some more details that might be helpful to understanding what's going on: https://github.com/rust-lang/lang-team/blob/master/design-me....