about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-11 11:44:32 +0000
committerbors <bors@rust-lang.org>2022-10-11 11:44:32 +0000
commitd08f1c3dff1827d401bafb82ab509a9d1e954008 (patch)
tree12ed26b5f042877ea79cdd5f696036983973dad5 /compiler/rustc_codegen_llvm/src
parent5d4995191326a3710206d152a710470e196e4466 (diff)
parent5e43ea96aad65fbaae5806ea6732ab59977ede1c (diff)
downloadrust-d08f1c3dff1827d401bafb82ab509a9d1e954008.tar.gz
rust-d08f1c3dff1827d401bafb82ab509a9d1e954008.zip
Auto merge of #13382 - lowr:fix/reorder-dyn-bounds-on-render, r=lowr
fix: reorder dyn bounds on render

Fixes #13368

#13192 changed the order of dyn bounds, violating the [contract](https://github.com/rust-lang/rust-analyzer/blob/3a69435af7a1e6273744085cb251adb2b9c30a03/crates/hir-ty/src/display.rs#L896-L901) with `write_bounds_like_dyn_trait()` on render. The projection bounds are expected to come right after the trait bound they are accompanied with.

Although the reordering procedure can be made a bit more efficient, I opted for relying only on the [invariants](https://github.com/rust-lang/rust-analyzer/blob/3a69435af7a1e6273744085cb251adb2b9c30a03/crates/hir-ty/src/lower.rs#L995-L998) currently documented in `lower_dyn_trait()`. It's not the hottest path and dyn bounds tend to be short so I believe it shouldn't hurt performance noticeably.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions