<korbin[m]>
<PhilMarkgraf[m]> "In a "Rust is not C" moment, I'..." <- > <@shakencodes:matrix.org> In a "Rust is not C" moment, I've discovered that Rust does not guarantee the order of data in structs (unless you set the repr attribute.) I have deployed hardware with firmware written in Rust that has data in a Rust data... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/CBEMqyPUQQncspbjrimJihjx>)
<JamesMunns[m]>
At least with deployed devices with concrete formats, you have a specific subset of instances to check against, and likely toolchain versions from CI as well!
AlexandrosLiarok has quit [Quit: Idle timeout reached: 172800s]
Lumpio[m] has joined #rust-embedded
<Lumpio[m]>
Why would you do that...
YuhanLin[m] has joined #rust-embedded
<YuhanLin[m]>
how did that get past code review lmao
<thejpster[m]>
Tired: Sending data over QuadSPI
<thejpster[m]>
Wired: Sending data over the 4-bit Trace Port at 150 MTx/sec
<thejpster[m]>
rust-analyzer is killing my 16GB RAM desktop. I need a bigger computer.
<rmsyn[m]>
@mvirkkunen: from what I've seen, `extern crate core as std` is used as a convenience in crates that build under `no-std` and `std`. it's to avoid doing feature-gates everywhere in the code
<Lumpio[m]>
Yeah but like, why not just directly import stuff from core instead of making a confusing alias like that
<rmsyn[m]>
because there are a number of overlaps in `std` and `core`, avoids context-switching, and avoids explicitly importing the `core` crate in the `std` build.
<rmsyn[m]>
it mostly comes down to a matter of preference, though. you can achieve similar results in multiple ways
<rmsyn[m]>
once you've seen it a couple times, it's really not that confusing
<rmsyn[m]>
the first time I saw it with a similar error to above, it definitely tripped me up, too :shrug: