ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
jasperw has quit [Ping timeout: 252 seconds]
Lumpio- has quit [Ping timeout: 252 seconds]
jasperw has joined #rust-embedded
Lumpio- has joined #rust-embedded
vancz has quit [Ping timeout: 252 seconds]
vancz has joined #rust-embedded
vancz has quit [Ping timeout: 252 seconds]
vancz has joined #rust-embedded
stgl has quit [Quit: ZNC 1.8.2 - https://znc.in]
<thejpster[m]> <dsvsdveg[m]> "Hey everyone, i'm looking to..." <- Does LLVM support PIC16F?
<thejpster[m]> > We recommend using a union to set the reserved spots to 0; None (Option<fn()>) may also work but it’s not guaranteed that the None variant will always be represented by the value 0.
<thejpster[m]> With NPO isn’t that guaranteed?
chrysn[m] has joined #rust-embedded
<chrysn[m]> IIUC, NPO just says that pointers have a niche. 0 is an obvious niche, but any other invalid pointer would also work. (There are probably no alignment niche patterns on Cortex-M given that thumb mode is allowed and set by the LSB, but maybe 0xffffffff is just as invalid and thus for grabs as a niche).
<thejpster[m]> transmute([0u8; _]) is definitely None for fn
<chrysn[m]> … but indeed the guarantee you found goes further.
<thejpster[m]> Cool. It makes the vector table much simpler. Something for version 0.8 perhaps.
<chrysn[m]> It also helps with expressing the (IMO asinine) decision of many ARM implementers to start mapping flash at 0 and placing the initial vectors there.
Socke has quit [Ping timeout: 252 seconds]
Socke has joined #rust-embedded
sroemer has quit [Ping timeout: 246 seconds]
sroemer has joined #rust-embedded
<JamesMunns[m]> I think it USED to not be guaranteed
<JamesMunns[m]> NPO wasn't guaranteed until... some point? Likely after 2018 when that comment was probably written
ello has quit [Ping timeout: 244 seconds]
ello has joined #rust-embedded
<JamesMunns[m]> Docs didn't change to state this was "guaranteed" until about 2020: https://github.com/rust-lang/rust/commit/73ada2d40429488aaaacf37b608bababc137b910, I think it was "commonly expected" before then?
<JamesMunns[m]> 2019 maybe as the "official" guarantee's start?
<JamesMunns[m]> That PR added the rustc_nonnull_optimization_guaranteed internal attribute
<JamesMunns[m]> So we're only 6 years behind or so :)
<JamesMunns[m]> It was correct, at the time of writing, May 2018
<thejpster[m]> there's a ticket for this: https://github.com/rust-embedded/cortex-m/issues/569
RandomExplosion[ has quit [Quit: Idle timeout reached: 172800s]
henrik_alser[m] has quit [Quit: Idle timeout reached: 172800s]
joelsa[m] has quit [Quit: Idle timeout reached: 172800s]
danielb[m] has quit [Quit: Idle timeout reached: 172800s]
Socke has quit [Quit: WeeChat 4.5.1]