use const steal#641
Conversation
|
Doesn't the |
Yes, and this is the correct result. However, suppose you are writing unsafe code and you need to call cortex-m methods, while still allowing safe code to take them. There is no way to do so without using a transmute, because calling |
|
This is an annoying legacy thing from the early ecosystem days when cortex-m, svd2rust, and cortex-m-rtic (then -rtfm) were a bit more co-designed, but at the moment RTIC (and perhaps other things we don't know about) uses I think the only option (short of a breaking change in 0.8 or 1.0 where we change the API completely) is to add a new method that is |
|
@adamgreig What about 'const_steal'? |
The steal function is already unsafe, so there's no need to mark taken to make sure that someone else doesn't take it.