Sean Marshallsay
Sean Marshallsay
Section 2.3.6 Exercise 2 claims that tracemem will show two copies, but it only shows one on 4.1.1.
The exercise currently says: ``` 1. Explain why `tracemem()` shows two copies when you run this code. Hint: carefully look at the difference between this code and the code shown...
I think this is a fairly uncontroversial example of an anti-pattern, but I don't think many people realise that [`std::sync::Once`](http://doc.rust-lang.org/std/sync/struct.Once.html) even exists.
Here is a reproduction of the issue from as fresh a state as I could manage: ``` $ radian --version radian version: 0.5.11 r executable: C:\Program Files\R\R-4.1.1\bin\R r version: 4.1.1...
Looks like it's been [done intentionally](https://github.com/PistonDevelopers/conrod/blob/50a2059adc398afeac8f1a11157b917ef3b31f00/src/widget/graph/mod.rs#L599) due to [the use of `TypeId`s in the `WidgetIdMap`](https://github.com/PistonDevelopers/conrod/blob/50a2059adc398afeac8f1a11157b917ef3b31f00/src/widget/graph/mod.rs#L159), but I don't really know enough about how Conrod works to understand why it's necessary....
`#[repr(u8)]`, etc. control the size of a C-like enum, there doesn't seem to be a portable way of specifying this in C but I could be missing something. `#[repr(packed)]` removes...
This could be done using `noreturn`, but that isn't yet standard and it probably plays badly with panics.
My initial thought is to write a few minimal cheddar blocks in various different files and use rust to compile, run and clean them.
This should make things more flexible for developers when we implement an extensible compiler interface. Probably need to use a custom session type to abstract away any breaking changes in...
The current way special cases newtypes which don't have any direct C equivalent. This would be a breaking change.
Probably require moving to a ParseSess based error handling. Store the languages requested as a vector of trait-objects. Hopefully be able to stop special casing C (so generating a header...