diff --git a/TROUBLES.md b/TROUBLES.md index 664caf8eb..68eee2c4e 100644 --- a/TROUBLES.md +++ b/TROUBLES.md @@ -6,7 +6,7 @@ passing an array of small elements (small structs or integers). Building such an array with a `Vec` can be expensive, especially when most of the time the array only contains a single element. -- No way to create a `*mut T` pointer from a `*mut c_void()` and a size when `T` is unsized. This had to be implemented in a custom +- No way to create a `*mut T` pointer from a `*mut c_void` and a size when `T` is unsized. This had to be implemented in a custom trait. - [Can't cast an `ImageResource` into a `Resource` even though the former depends on the latter](https://github.com/rust-lang/rust/issues/5665). @@ -17,4 +17,8 @@ - https://github.com/rust-lang/rust/issues/29328 - Some trait implementations have an associated type that looks like `type T = (Arc, Arc);`. HKTs would allow this parameter to take - references to the Arcs instead, and avoid having to clone them. + references to the Arcs instead, and avoid having to clone them. This problem could by bypassed by making the code more ugly, but it's not worth + it just to avoid cloning some Arcs. + +- Visibility rules mean that you can't write `struct Error; pub mod foo { pub struct Foo; impl From for Foo { ... } }`. Rustc complains + that `Error` is private an exported in `Foo`'s signature, even though that's in the author's opinion a totally legitimate usage.