scottmcm
scottmcm
Thanks for the CC, @CAD97. I guess it's good that my other change about making this a niche never happened 🙃 > For later releases, it might be a reasonable...
> `Layout` manipulation functions are sound but may return incorrect (e.g. modulo `isize::MAX as usize + 1`) results or an unsafe `Layout` (i.e. `size > isize::MAX`), This concerns me. I...
@rustbot label +T-libs-api -T-libs And a coin flip between the two -api members on the review rotation says… r? @m-ou-se
For the unresolved question: another option might be to expose https://stdrs.dev/nightly/x86_64-unknown-linux-gnu/core/mem/valid_align/struct.ValidAlign.html and use it as the parameter type.
I think the unresolved question needs an answer, not just a mention. As I brought up [earlier](https://github.com/rust-lang/rust/issues/96284#issuecomment-1221439030), I think it'd be really nice to have a type for valid alignments....
> given an `usize` (e.g. from an external library) you need a [trailing_zeros](https://doc.rust-lang.org/std/primitive.usize.html#method.trailing_zeros) call to convert back That's assuming it would be stored as [`log_2(align)`](https://github.com/rust-lang/rust/blob/cf9ed0dd5836201843d28bbad50abfbe1913af2a/library/core/src/mem/valid_align.rs#L53-L55), but that's not necessary. In...
Awesome to see another stab at this! > Passing a closure is essentially the same thing as passing an initializer list, so it should have the same performance as C++...
> Ideally, I'd be able to do `let x: int = 7;` and it would just work without having to call `.into()` Note that this is also true for other...
@jhpratt Great to hear it! I look forward to seeing how it goes. The piece I keep looking forward to, though -- `Integer + Integer => Integer` -- isn't in...
Thanks for the RFC! I'm definitely in favour of making common patterns be "real" features where feasible -- rather than having people make unused functions and such. (Similar to how...