about summary refs log tree commit diff
path: root/compiler/rustc_session/src/lib.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-06 21:56:25 +0100
committerGitHub <noreply@github.com>2025-02-06 21:56:25 +0100
commitae1410e2d8c6c06fabdb1b6f2a0420e461e5b74e (patch)
tree8d5b84bd85c624ae8363e26f5b8f10dbf9332307 /compiler/rustc_session/src/lib.rs
parent4b7e55ada3c7d6c678c6f54f91b701f50fa62181 (diff)
parente485cc5e0217fbb3f495ee0db56d6dcb5f36de22 (diff)
downloadrust-ae1410e2d8c6c06fabdb1b6f2a0420e461e5b74e.tar.gz
rust-ae1410e2d8c6c06fabdb1b6f2a0420e461e5b74e.zip
Rollup merge of #136069 - yotamofek:next-solver-slice, r=compiler-errors
Simplify slice indexing in next trait solver

Unless I'm missing something:
- no need to explicitly specify the end of the slice as the end of the index range
- the `assert` is redundant since the indexing will panic for the same condition

I think this change simplifies it a bit. Also replaced the `for` loop of `push`es with a call to `extend` with an iterator. Might improve performance since it knows how many elements will be added beforehand and can pre-reserve room?

r? `@compiler-errors` , I think
Diffstat (limited to 'compiler/rustc_session/src/lib.rs')
0 files changed, 0 insertions, 0 deletions