scottmcm

Results 42 issues of scottmcm

`.into_iter()` on arrays was slower than it needed to be (especially compared to slice iterator) since it uses `Range`, which needs to handle degenerate ranges like `10..4`. This PR adds...

S-waiting-on-bors
T-libs

We have `[T; N]: TryFrom` (#76310) and `Box: TryFrom`, but not this combination. `vec.into_boxed_slice().try_into()` isn't quite a replacement for this, as that'll reallocate unnecessarily in the error case. **Insta-stable, so...

T-libs-api
S-waiting-on-bors
disposition-merge
finished-final-comment-period
needs-fcp
to-announce

I was trying to make a link to the `## Final Comment Period` section specifically today, and was surprised that there's no `id`/`name` attributes in the page that could be...

Link for opt trunk: General Alive proof for divisor small enough to avoid addition overflow: Given an input like ```llvm %_4 = urem i32 %x, 13 %_6 = urem i32...

backend:X86
llvm:codegen
llvm:instcombine

This, of course, has worked for ages: ```rust fn foo1 { s.into() } ``` With in-band lifetimes, it can be simplified to ```rust fn foo2(s: String) -> Cow { s.into()...

A-lifetimes
T-compiler
C-bug

Given the following code: ```rust macro_rules! foo { ($t:type) => {}; } foo! { Option } ``` The current output is: ``` error: invalid fragment specifier `type` --> src/lib.rs:2:6 |...

A-diagnostics
A-macros
T-compiler
D-verbose

### Description lint: https://rust-lang.github.io/rust-clippy/master/index.html#filter_map_identity This was originally added as being like `flat_map_identity` (https://github.com/rust-lang/rust-clippy/pull/6685), but they're not quite analogous. `.flatten()` is unambiguously better than `.flat_map(identity)`, but the same isn't true for...

I-false-positive

It's really nice that I can look at LLVM-IR or ASM or … on the playground. But sadly, when I get a share link , it doesn't include the button...

enhancement
help wanted

Reserve `k#keyword` in edition 2021 and beyond as a general syntax for adding keywords mid-edition instead of needing speculative reservations. [Rendered](https://github.com/scottmcm/rfcs/blob/never-preemptively-reserve-keywords/text/0000-raw-keywords.md)

T-lang
I-lang-nominated

It's not legal to optimize away pointer `p + (q - p)` in general (), due to provenance. However, when it's used in `ptrtoint`, and thus the provenance isn't relevant,...

llvm:optimizations
missed-optimization