Re: [rust-dev] Declaring the API unsafe while keeping the internal safety checks

2015-01-02 Thread Vladimir Pouzanov
Well, strictly speaking it *is* memory safety, as it all gets down to an unsafe volatile store. Although I think I extend the 'unsafety' a bit by considering code that can cause CPU to halt as unsafe too. On Fri, Jan 2, 2015 at 2:11 AM, Kevin McGuire kmcg3...@gmail.com wrote: Yes unsafe is

Re: [rust-dev] Declaring the API unsafe while keeping the internal safety checks

2015-01-02 Thread David Henningsson
On 2015-01-01 12:17, Vladimir Pouzanov wrote: I had this idea for some time and I'd like to discuss it to see if it is something reasonable to be proposed for rust to implement or there are other ways around the problem. Let's say I have a low level function that manipulates the hardware